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的图片。
答案 0 :(得分:1)
您需要在自己的机器中安装:
sudo apt-get install libpq-dev python-dev