Add libpg-dev to developer docs

Bug #1608653 reported by Gage Hugo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Gage Hugo

Bug Description

When setting up a development environment following the instructions here:

http://docs.openstack.org/developer/keystone/devref/development.environment.html

On Ubuntu 16.04.1 when installing dependencies from test-requirements.txt using pip, the installation fails when it tries to install psycopg2:

Collecting psycopg2>=2.5; extra == "postgresql" (from oslo.db[fixtures,mysql,postgresql]>=4.1.0->-r test-requirements.txt (line 13))
  Downloading psycopg2-2.6.2.tar.gz (376kB)
    100% |████████████████████████████████| 378kB 769kB/s
    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 /tmp/pip-build-j460mO/psycopg2/

Googling this error brings you to this fix from stackoverflow:

http://stackoverflow.com/questions/11618898/pg-config-executable-not-found

Which simply involves installing the libpq-dev package. This fixes the problem and the rest of test-requirements.txt are installed fine.

Recommend adding libpg-dev (Ubuntu/Debian) along with other package managers to the list of dependencies to install before using pip:

http://docs.openstack.org/developer/keystone/devref/development.environment.html#installing-dependencies

Gage Hugo (gagehugo)
Changed in keystone:
assignee: nobody → Gage Hugo (gagehugo)
Revision history for this message
Steve Martinelli (stevemar) wrote :

sounds good Gage, please update the docs

Changed in keystone:
importance: Undecided → Low
status: New → Triaged
milestone: none → newton-3
summary: - Installing reqs from test-requirements.txt using pip fails due to
- missing lib package for psycopg2
+ Add libpg-dev to developer docs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/349688

Changed in keystone:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/349688
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=44ccc92c1ac368f5318d162957c58ea35ba74150
Submitter: Jenkins
Branch: master

commit 44ccc92c1ac368f5318d162957c58ea35ba74150
Author: Gage Hugo <email address hidden>
Date: Mon Aug 1 15:20:04 2016 -0500

    Added postgresql libs to developer docs

    Added corresponding packages for postgresql libraries for various
    distros to the development docs to avoid causing pip to fail when
    installing dependencies within test-requirements.txt

    Change-Id: Ie181cf01bb22366b80d0639e66d939aaa948490b
    Closes-Bug: #1608653

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/keystone 10.0.0.0b3

This issue was fixed in the openstack/keystone 10.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.