对于 Jenkins 来说,我正在尝试使用本地 Jenkins 服务器来自动化我的测试,因为我对目录进行了更改,但是,当我尝试构建 virtualenv 以便我可以运行测试时,我收到以下错误我的代码库,它在 psycopg2 处中断,我不明白如何解决这个问题。 有没有更好的方法来构建我的 virtualenv 然后测试我的代码库?
Collecting psycopg2==2.6.1 (from -r requirements.txt (line 32))
Downloading psycopg2-2.6.1.tar.gz (371kB)
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 /private/var/folders/l1/bwg91l0x1mn7dkjcw3bg569000007q/T/pip-build-TWCDOt/psycopg2
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Build step 'Virtualenv Builder' marked build as failure
Finished: FAILURE
下面是我的配置的图片,以帮助我设置 virtualenv。
最佳答案
您需要在您的机器上安装:
sudo apt-get install libpq-dev python-dev
关于python - 如何根据 Jenkins CI 的 jenkins pip 要求安装 psycopg2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35141438/