简体   繁体   English

无法在Windows上点安装Psycopg2

[英]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: 当我尝试在虚拟环境中使用PIP安装psycopg2时,在Windows 8上出现以下错误:

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: 根据psycopg网站 ,您应该使用Windows端口安装它:

I'm guessing you'll need a version of Visual Studio installed for pip to be able to compile the headers correctly. 我猜您需要安装一个Visual Studio版本才能使pip正确编译标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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