简体   繁体   English

如何根据Jenkins CI的jenkins pip要求安装psycopg2?

[英]How do I install psycopg2 from jenkins pip requirements for Jenkins CI?

New to Jenkins, I'm trying to use my local Jenkins server to automate my tests as I make changes to my directory however, I'm getting the following error when I try to build the virtualenv so I can run tests against my codebase, it breaks at psycopg2 and I do not understand how I'm able to fix this. Jenkins的新手,我尝试使用本地Jenkins服务器在对目录进行更改时自动执行测试,但是,当我尝试构建virtualenv以便对代码库运行测试时遇到以下错误,它在psycopg2处中断,我不知道如何解决此问题。 Is there a better approach to build my virtualenv and then test my code base? 有没有更好的方法来构建我的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

The following is a pic of what my configuration is to help me setup the virtualenv. 以下是我的配置可以帮助我设置virtualenv的图片。

在此处输入图片说明

您需要在计算机上安装:

sudo apt-get install libpq-dev python-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM