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:
☑️ I am running the latest version of pip, i.e. typing pip --version you get this version.
☑️ 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 Pro
Psycopg version: 2.9.9
Python version: 3.13.0a3
PostgreSQL version: psql (PostgreSQL) 16.3
pip version: 24.0
Here is the error I am getting while installing psycopg2 with the pip install psycopg2 cmd
Creating library build\temp.win-amd64-cpython-313\Release\psycopg_psycopg.cp313-win_amd64.lib and object build\temp.win-amd64-cpython-313\Release\psycopg_psycopg.cp313-win_amd64.exp
utils.obj : error LNK2001: unresolved external symbol _PyInterpreterState_Get
build\lib.win-amd64-cpython-313\psycopg2_psycopg.cp313-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\link.exe' failed with exit code 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
ERROR: Could not build wheels for psycopg2, which is required to install pyproject.toml-based projects
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:
Here is the error I am getting while installing psycopg2 with the
pip install psycopg2
cmdCreating library build\temp.win-amd64-cpython-313\Release\psycopg_psycopg.cp313-win_amd64.lib and object build\temp.win-amd64-cpython-313\Release\psycopg_psycopg.cp313-win_amd64.exp utils.obj : error LNK2001: unresolved external symbol _PyInterpreterState_Get build\lib.win-amd64-cpython-313\psycopg2_psycopg.cp313-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\link.exe' failed with exit code 1120 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psycopg2 Running setup.py clean for psycopg2 Failed to build psycopg2 ERROR: Could not build wheels for psycopg2, which is required to install pyproject.toml-based projects