我试图在Cygwin中安装psycopg2,但尚未成功。错误信息如下:
Gaurav@gauravpc ~/FieldAgentWeb/FieldAgentWeb
$ easy_install psycopg2
Searching for psycopg2
Reading http://pypi.python.org/simple/psycopg2/
Reading http://initd.org/psycopg/
Reading http://initd.org/projects/psycopg2
Best match: psycopg2 2.4.2
Downloading http://initd.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.2.tar.gz
Processing psycopg2-2.4.2.tar.gz
Running psycopg2-2.4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QBYpxH
/psycopg2-2.4.2/egg-dist-tmp-gcLa5F
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'.
error: Directory not empty <built-in function rmdir> /tmp/easy_install-QBYpxH/ps
ycopg2-2.4.2/tests
之后我试图获取d pg_config文件,但在网上找不到它。
libpq-devel
是必须的,而postgresql-devel
不是必需的。 - juanitoganpgcli
包,但在为psycopg2
构建wheel时失败了。在安装您提到的软件包后,它成功安装了。现在我运行pgcli
时遇到另一个错误,但这是另一个故事… - Wirone