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

psycopg2-binary version 2.9.10 installation fails on MacOS/Python 3.9 #1737

Closed
3 tasks
jrmccluskey opened this issue Oct 16, 2024 · 3 comments
Closed
3 tasks

Comments

@jrmccluskey
Copy link

This is a bug tracker
If you have a question, such has "how do you do X with Python/PostgreSQL/psycopg2" please write to the mailing list or open a question instead.

Before opening this ticket, please confirm that:

Please complete the following information:

  • OS: MacOS Sonoma 14.7
  • Psycopg version: 2.9.10
  • Python version: 23.2
  • PostgreSQL version:
  • pip version: 24.2

This output is produced when trying to install 2.9.10:

Collecting psycopg2-binary
  Downloading psycopg2-binary-2.9.10.tar.gz (385 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.8/385.8 kB 4.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running egg_info
      creating /private/var/folders/78/cpt_wrr57ns62nrmbr5df77800rhd8/T/pip-pip-egg-info-o_le5nps/psycopg2_binary.egg-info
      writing /private/var/folders/78/cpt_wrr57ns62nrmbr5df77800rhd8/T/pip-pip-egg-info-o_le5nps/psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/78/cpt_wrr57ns62nrmbr5df77800rhd8/T/pip-pip-egg-info-o_le5nps/psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to /private/var/folders/78/cpt_wrr57ns62nrmbr5df77800rhd8/T/pip-pip-egg-info-o_le5nps/psycopg2_binary.egg-info/top_level.txt
      writing manifest file '/private/var/folders/78/cpt_wrr57ns62nrmbr5df77800rhd8/T/pip-pip-egg-info-o_le5nps/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>).
      
      [end of output]

Installing 2.9.9 does not have any issues in the same environment. This broke some tests in Apache Beam (beam/#32811)

@dvarrazzo
Copy link
Member

hmmm... I thought I had ported the macos-14 build to github actions, but it seems like I only did it for psycopg 3.

I will try to add the missing packages in the next few hour.

@LuisHenri
Copy link

I think the same is happening for Windows. It was all working fine until this new 2.9.10 version. Now, any package depending on latest psycopg2-binary (2.9.* or 2.*) is failing.

@dvarrazzo
Copy link
Member

@jrmccluskey I've reviewed the issue: all the packages we can produce on public runners have been produced and are available on PyPI:

psycopg2_binary-2.9.10-cp310-cp310-macosx_12_0_x86_64.whl
psycopg2_binary-2.9.10-cp311-cp311-macosx_12_0_x86_64.whl
psycopg2_binary-2.9.10-cp312-cp312-macosx_12_0_x86_64.whl
psycopg2_binary-2.9.10-cp313-cp313-macosx_12_0_x86_64.whl
psycopg2_binary-2.9.10-cp38-cp38-macosx_12_0_x86_64.whl
psycopg2_binary-2.9.10-cp39-cp39-macosx_12_0_x86_64.whl

psycopg2_binary-2.9.10-cp310-cp310-macosx_14_0_arm64.whl
psycopg2_binary-2.9.10-cp311-cp311-macosx_14_0_arm64.whl
psycopg2_binary-2.9.10-cp312-cp312-macosx_14_0_arm64.whl
psycopg2_binary-2.9.10-cp313-cp313-macosx_14_0_arm64.whl

Other combinations are no more supported by publicly available runners so we will not support them for free. Apache Beam is welcome to contribute to this project, or to use psycopg2 in non-binary version.

@LuisHenri this is a ticket open for macOS, see #1736 about windows.

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