简体   繁体   中英

How to install psycopg2 on windows 10?

While trying to install psycopg2-binary with pip3, I get the following error message:

Setup script exited with error: command 'C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\link.exe' failed with exit status 1120

I have 83 error LNK2001.

Why are you installing psycopg2-binary and not just psycopg2 ? Also make sure you have PostgreSQL executables and DLLs in PATH as advised in this answer.

Which Python version do you have? At the moment, trying to install psycopg2-binary gives errors with the newest version of Python (3.8). More about this at https://github.com/psycopg/psycopg2/issues/990 .

On windows, I could not install psycopg2. When browsing around, people were saying to isntall directly the binary which I was trying to do. However for some reasons, the 64 bits binary was not working but the 32 bits version has worked fine and solved my issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM