我有麻烦的安装心理2.我得到以下错误时,我尝试pip install 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'.
----------------------------------------Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
但问题是pg_config
实际上在我的PATH
中;它运行没有任何问题:
$ which pg_config/usr/pgsql-9.1/bin/pg_config
我尝试将pg_config路径添加到setup.cfg
文件并使用我从他们的网站(http://initd.org/psycopg/)下载的源文件构建它,我收到以下错误消息!
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
但它确实在那里!!!
我对这些错误感到困惑。有人能帮忙吗?
顺便说一句,我sudo
所有的命令。我也在RHEL 5.5上。