我们有一个本地的pypiserver,到目前为止,我们对它很满意。
但是psycopg2带来了麻烦。它希望安装pg_config。我看不出为什么要把它安装在镜像服务器上。我知道它需要安装在安装psycopg2的客户端上。
这是psycopg2中的错误吗?或者我使用了错误的选项来将包放到镜像中?
pypi@gray:~> pip install --no-deps --no-install -d packages psycopg2
Downloading/unpacking psycopg2
File was already downloaded packages/psycopg2-2.5.1.tar.gz
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'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pypi/tmp/pip-build/psycopg2
Storing complete log in /home/pypi/.config/pip/pip.log我们使用这个pypiserver:https://pypi.python.org/pypi/pypiserver
发布于 2014-09-25 05:48:45
我知道这个问题已经提了一年多了,但答案是pg_config是一个只支持linux的模块。您需要安装postgresql-devel才能获得它。
https://stackoverflow.com/questions/17275323
复制相似问题