Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot install psycopg2

Using sage 7.3, I tried:

sage -sh
pip install psycopg2

and got

...
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'.

Others stated that one needs to install libpq-dev and python-dev to solve the problem (http://stackoverflow.com/questions/5420789/how-to-install-psycopg2-with-pip-on-python), but how do I do this in sage? pip install libpq-dev does not work.