I want to install psycopg2, but I keep getting errors
If you do pip install psycopg2
in the command window,
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'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
But there's already a pg_config in PATH I've confirmed that it's running well.
$ which pg_config
/usr/pgsql-9.1/bin/pg_config
If you put the path of pg_config in the setup.cfg file and build it as a source file downloaded from the pg_config website (http://initd.org/psycopg/), you can also
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
Why do you keep saying you can't find it? ㅜ<
How can you do this even though you did it with sudo in RHEL 5.5 environment?
python pip psycopg2
This seems to be a similar situation to the post .
If python-dev
is installed, try installing libpq-dev
.
In the command window: sudo apt-get install libpq-dev python-dev
Besides that,
pg_config
is located in postgresql-devel
Reinstall postgresql-devel
or
(libpq-dev
for Debian/Ubuntu)
At OSX,
brew install postgresql
You must.
© 2024 OneMinuteCode. All rights reserved.