Installing psycopg2 into new virtualenv fails on PATH problem

Hi,

I am attempting to install psycopg2 into a new virtualenv using the tool at Pycharm > Preferences... > Project Interpreter

It fails, and produces the following error log:

Install packages failed: Error occurred when installing package psycopg2. The following command was executed: packaging_tool.py install --build-dir /private/var/folders/hz/3kmkcvx53k1blp9kyw5bzzch0000gp/T/pycharm-packaging6563681948107794508.tmp psycopg2 The error output of the command: Downloading/unpacking psycopg2   Running setup.py egg_info for package psycopg2     Error: pg_config executable not found.     Please add the directory containing pg_config to the PATH     or specify the full executable path with the option:         python setup.py build_ext --pg-config /path/to/pg_config build ...     or with the pg_config option in 'setup.cfg'.     Complete output from command python setup.py egg_info:     running egg_info creating pip-egg-info/psycopg2.egg-info writing pip-egg-info/psycopg2.egg-info/PKG-INFO writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or specify the full executable path with the option:     python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /private/var/folders/hz/3kmkcvx53k1blp9kyw5bzzch0000gp/T/pycharm-packaging6563681948107794508.tmp/psycopg2 Storing complete log in /Users/xxxxxxxxx/.pip/pip.log

I can workaround the issue by installing the package from the command line in Terminal, but I was wondering how I can control the PATH that Pycharm uses.
1 comment
Comment actions Permalink

It still works like that, and I hope it will connect my django with postgres db

0

Please sign in to leave a comment.