Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'pip install psycopg2-binary==2.8.3' fails with 'Error: pg_config executable not found.' #1191

Closed
Igneous01 opened this issue Nov 13, 2020 · 1 comment

Comments

@Igneous01
Copy link

Trying to install the psycopg2-binary, and I am getting the same installation error about pg_config, even though it mentions in this error message that pg_config is not required with the binary?

OS: macOS Catalina 10.15.7

`Collecting psycopg2-binary==2.8.3
Downloading psycopg2-binary-2.8.3.tar.gz (378 kB)

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at pypa/pip#8333.
ERROR: Command errored out with exit status 1:
command: /Users/davidzalewski/python38virtual/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pycharm-packaging/psycopg2-binary/setup.py'"'"'; file='"'"'/private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pycharm-packaging/psycopg2-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki
cwd: /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pycharm-packaging/psycopg2-binary/
Complete output (23 lines):
running egg_info
creating /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki/psycopg2_binary.egg-info
writing /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki/psycopg2_binary.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki/psycopg2_binary.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki/psycopg2_binary.egg-info/top_level.txt
writing manifest file '/private/var/folders/06/1bj82db17v7b6lgwn_p4pdgm0r5f50/T/pip-pip-egg-info-7veznhki/psycopg2_binary.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  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'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).

----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
`

@dvarrazzo
Copy link
Member

Binary packages for 2.8.3 are here: https://pypi.org/project/psycopg2-binary/2.8.3/#files

As far as I can see Python 3.8 is not available there: probably that release predates it.

Please install at least 2.8.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants