简体   繁体   中英

Can't pip install psycopg2 on windows

When I try to install psycopg2, using PIP in a virtual environment, on Windows 8 I get the following error:

c:\python27\include\pyconfig.h(231) : fatal error C1083: Cannot open include   file: 'basetsd.h': No such file or directory

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2

I had previously had this error:

error: Unable to find vcvarsall.bat

So I followed the various answers in this question:

and managed to get rid of

 error: Unable to find vcvarsall.bat

but have this new one to contend with

any ideas?

thanks

According to the psycopg website , you're supposed to install it using the Windows port:

I'm guessing you'll need a version of Visual Studio installed for pip to be able to compile the headers correctly.

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