简体   繁体   English

Python:无法easy_install(Windows 7 x64)

[英]Python: Unable to easy_install (Windows 7 x64)

I'm running python 2.7 on Windows 7 x64, and trying to easy_install pysqlite. 我在Windows 7 x64上运行python 2.7,并尝试easy_install pysqlite。

With command: easy_install -U pysqlite 使用命令: easy_install -U pysqlite

It exits with the error: 它以错误退出:

error: Setup script exited with error: Unable to find vcvarsall.bat 错误:安装脚本退出并显示错误:无法找到vcvarsall.bat

This site: http://code.google.com/p/rdflib/issues/detail?id=104#c4 suggests a workaround of installing MingGW, saying to check the g++ option on install (plus some other stuff). 这个网站: http//code.google.com/p/rdflib/issues/detail? id = 104#c4建议安装MingGW的解决方法,说要检查安装上的g ++选项(以及其他一些东西)。

Unfortunately, MingGW does not give me the option to install g++, only c++, and of course on running easy_install a second time, I get ".. command 'gcc' failed: No such file or directory". 不幸的是,MingGW没有给我选择安装g ++,只有c ++,当然第二次运行easy_install,我得到“..命令'gcc'失败:没有这样的文件或目录”。 So now I am el stucko. 所以现在我被困了。

Any advice on how to fix this problem would be great! 关于如何解决这个问题的任何建议都会很棒!

Even if you install a compiler (MinGW or Visual Studio), you still have to install SQLite3 development libraries. 即使您安装了编译器(MinGW或Visual Studio),您仍然需要安装SQLite3开发库。 It is a pain to build things on Windows, so I suggest that you get the unofficial pre-built Windows binaries and install it. 在Windows上构建东西很痛苦,因此我建议你获得非官方的预构建Windows二进制文件并进行安装。

As an aside, you should probably consider switching to ActivePython as it includes a package manager that allows you to install pre-built modules from ActiveState's repository . 另外,您应该考虑切换到ActivePython,因为它包含一个包管理器,允许您从ActiveState的存储库安装预构建的模块。

As for the particular error in question, that is a distutils bug and you should raise your concerns in the Python bug tracker . 至于有问题的特定错误,这是一个distutils错误,你应该在Python bug跟踪器中引起你的担忧。

当说“g ++编译器”时,它们实际上是指C ++编译器,对于mingw来说是gcc。

You need to install the Microsoft Visual C compiler thingy (the 2010 one). 您需要安装Microsoft Visual C编译器(2010年)。 And use that as your compiler for all modules. 并将其用作所有模块的编译器。 You can also mess with distuls.cfg and specify a compiler that way. 您也可以使用distuls.cfg,并以这种方式指定编译器。

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

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