Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

How to handle failing psycopg2 installation #17

Closed
gplssm opened this issue Jun 6, 2016 · 1 comment
Closed

How to handle failing psycopg2 installation #17

gplssm opened this issue Jun 6, 2016 · 1 comment
Labels

Comments

@gplssm
Copy link
Contributor

gplssm commented Jun 6, 2016

psycopg2 which is required by oemof.db fails installing via pip3

Downloading/unpacking psycopg2
  Downloading psycopg2-2.6.1.tar.gz (371kB): 371kB downloaded
  Running setup.py (path:/tmp/pip-build-a798ogk9/psycopg2/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 dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt

writing pip-egg-info/psycopg2.egg-info/PKG-INFO

writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.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'.

Proposed solution is to install two packages via Linux package management:
sudo apt-get install libpq-dev python-dev

This is in general possible. But, same as with #16, I would love to how a solution that is in-line with capabilities of pip. Does anyone know how I can tell pip to install the above package via system package management and this favorably platform independent?

@uvchik uvchik added the wontfix label May 25, 2020
@uvchik
Copy link
Member

uvchik commented May 25, 2020

See the documentation of psycopg2 to get more information on how to install psycopg2:

https://www.psycopg.org/docs/install.html#installation

@uvchik uvchik closed this as completed May 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants