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

Installing psycopg2 package from python3.10-slim docker image fails. #1368

Closed
niloct opened this issue Oct 7, 2021 · 3 comments
Closed

Installing psycopg2 package from python3.10-slim docker image fails. #1368

niloct opened this issue Oct 7, 2021 · 3 comments

Comments

@niloct
Copy link

niloct commented Oct 7, 2021

  • OS: Mac OS Catalina, Ubuntu 20.04
  • Psycopg version: 2.9.1
  • Python version: 3.10
  • PostgreSQL version: none
  • pip version: 21.2.4

Downloading psycopg2-binary-2.9.1.tar.gz (380 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vz4wwpf0/psycopg2-binary_a3e66557f92442b0a6fb8d95cf2131e5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vz4wwpf0/psycopg2-binary_a3e66557f92442b0a6fb8d95cf2131e5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-keioh9gk
         cwd: /tmp/pip-install-vz4wwpf0/psycopg2-binary_a3e66557f92442b0a6fb8d95cf2131e5/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-keioh9gk/psycopg2_binary.egg-info
    writing /tmp/pip-pip-egg-info-keioh9gk/psycopg2_binary.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-keioh9gk/psycopg2_binary.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-keioh9gk/psycopg2_binary.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-keioh9gk/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
    <https://www.psycopg.org/docs/install.html>).

    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/14/65/223a5b4146b1d5d5ab66f16ef194916a1ed9720da1f118d7bfb60b8f2bea/psycopg2-binary-2.9.1.tar.gz#sha256=b0221ca5a9837e040ebf61f48899926b5783668b7807419e4adae8175a31f773 (from https://pypi.org/simple/psycopg2-binary/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement psycopg2-binary==2.9.1 (from versions: 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1)
ERROR: No matching distribution found for psycopg2-binary==2.9.1
@niloct niloct changed the title Installing psycopg2 package from python3.10-slim image fails. Installing psycopg2 package from python3.10-slim docker image fails. Oct 7, 2021
@beltiras
Copy link

beltiras commented Oct 7, 2021

Ditto for an Alpine image. Also tried older versions of the package with no success. Same error message as @niloct.

@dvarrazzo
Copy link
Member

Python 3.10 is not yet supported by the build pipelines so psycopg-binary is not available yet for Python 3.10

Closing this as there are dupes.

@beltiras
Copy link

beltiras commented Oct 8, 2021

I'm using python 3.8.10. I don't see the dupes, which I would gladly have attached myself on.

Never mind me. Alpine is not friendly to binaries.

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

3 participants