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

Python 3.13 on Windows11 - "pip install psycopg2-binary" is erroring, asking me to install the C++ 14.0 compiler #1732

Closed
3 tasks done
ChristopherMaurer opened this issue Oct 8, 2024 · 4 comments

Comments

@ChristopherMaurer
Copy link

ChristopherMaurer commented Oct 8, 2024

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: Windows 11
  • Psycopg version: I don't know - it does not install
  • Python version: 3.13
  • PostgreSQL version: 16

Problem Description
installing psycopg2-binary is supposed to not require a C++ compiler, but it tries to build it anyway. Then asks me to install 1.6GB of Microsoft C++ compiler.

================= Output Display From pip install psycopg2========================
python -m pip install psycopg2-binary
Collecting psycopg2-binary
Using cached psycopg2-binary-2.9.9.tar.gz (384 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psycopg2-binary
Building wheel for psycopg2-binary (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for psycopg2-binary (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-313\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\errors.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\extras.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\pool.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\sql.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib\tz.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib_ipaddress.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib_json.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib_range.py -> build\lib.win-amd64-cpython-313\psycopg2
copying lib_init_.py -> build\lib.win-amd64-cpython-313\psycopg2
running build_ext
building 'psycopg2._psycopg' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2-binary
Failed to build psycopg2-binary
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psycopg2-binary)

@ChristopherMaurer
Copy link
Author

Error msg includes "Using cached psycopg2-binary-2.9.9.tar.gz (384 kB)". I guess that means it was trying to install 2.9.9 version.

@frenzymadness
Copy link

The reason is that psycopg2-binary does not yet provide pre-compiled wheels for Python 3.13. See the available wheels here: https://pypi.org/project/psycopg2-binary/#files

@dvarrazzo
Copy link
Member

Duplicate of #1692, to be fixed by #1729.

@AgungPN
Copy link

AgungPN commented Oct 15, 2024

is that issue release already? Cause I still have problem while try python:3.13 by docker with psycopg2.

When I check in pypi latest release still "Released: Oct 3, 2023"

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

4 participants