You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
[ yes] I am running the latest version of pip, i.e. typing pip --version you get this version.
[ no] If install failed, I typed pg_config on the command line and I obtained an output instead of an error.
Please complete the following information:
OS: windows 11
Psycopg version: 2.10
Python version: 3.13
PostgreSQL version: 16
pip version 24
error:
Collecting psycopg2==2.9.10
Using cached psycopg2-2.9.10.tar.gz (385 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py): started
Building wheel for psycopg2 (setup.py): finished with status 'error'
Running setup.py clean for psycopg2
Failed to build psycopg2
Could not find platform independent libraries
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psycopg2)
The text was updated successfully, but these errors were encountered:
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:
pip --version
you get this version.pg_config
on the command line and I obtained an output instead of an error.Please complete the following information:
error:
Collecting psycopg2==2.9.10
Using cached psycopg2-2.9.10.tar.gz (385 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py): started
Building wheel for psycopg2 (setup.py): finished with status 'error'
Running setup.py clean for psycopg2
Failed to build psycopg2
Could not find platform independent libraries
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[33 lines of output]
Could not find platform independent libraries
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
creating build\temp.win-amd64-cpython-313\Release\psycopg
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-DPSYCOPG_VERSION=2.9.10 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=160004 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -IC:\code\python\DjangoProject.venv\include -IC:\Users\Administrator\AppData\Local\Temp\pip-install-k12uenq0\psycopg2_61bfc7a72e6943f182cbe6baa5b59623\include -IC:\Users\Administrator\AppData\Local\Temp\pip-install-k12uenq0\psycopg2_61bfc7a72e6943f182cbe6baa5b59623\Include -I. -IC:/PROGRA
1/POSTGR1/16/include -IC:/PROGRA1/POSTGR1/16/include/server "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /Tcpsycopg\adapter_asis.c /Fobuild\temp.win-amd64-cpython-313\Release\psycopg\adapter_asis.objadapter_asis.c
.\psycopg/psycopg.h(35): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
https://www.psycopg.org/docs/install.html).
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psycopg2)
The text was updated successfully, but these errors were encountered: