Pip install psycopg2. Pycharm. pycharm import. pycharm install packages. psycopg2 postgresql.