Python:无法 easy_install (Windows 7 x64)
我在 Windows 7 x64 上运行 python 2.7,并尝试 easy_install pysqlite。
使用命令:easy_install -U pysqlite
它退出并出现错误:
错误:安装脚本退出并出现错误:无法找到 vcvarsall.bat
此站点:http://code.google.com/p/rdflib/issues/detail?id=104#c4 建议安装 MingGW 的解决方法,说要检查安装时的 g++ 选项(以及其他一些东西)。
不幸的是,MingGW 没有给我安装 g++ 的选项,只有 c++,当然,在第二次运行 easy_install 时,我得到“..命令'gcc'失败:没有这样的文件或目录”。所以现在我陷入了困境。
任何有关如何解决此问题的建议都会很棒!
I'm running python 2.7 on Windows 7 x64, and trying to easy_install pysqlite.
With command: easy_install -U pysqlite
It exits with the error:
error: Setup script exited with error: Unable to find 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).
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". So now I am el stucko.
Any advice on how to fix this problem would be great!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
即使你安装了编译器(MinGW或Visual Studio),你仍然需要安装SQLite3开发库。在 Windows 上构建东西是一件痛苦的事情,所以我建议你获取 非官方预构建的 Windows 二进制文件并安装它。
顺便说一句,您可能应该考虑切换到 ActivePython,因为它包含一个包管理器,允许您从 ActiveState 存储库 安装预构建模块。
至于有问题的特定错误,这是一个 distutils 错误,您应该在 Python 错误跟踪器 中提出您的疑虑。
Even if you install a compiler (MinGW or Visual Studio), you still have to install SQLite3 development libraries. It is a pain to build things on Windows, so I suggest that you get the unofficial pre-built Windows binaries and install it.
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.
As for the particular error in question, that is a distutils bug and you should raise your concerns in the Python bug tracker.
当提到“g++ 编译器”时,它们实际上指的是 C++ 编译器,对于 mingw 来说是 gcc。
When that says "g++ compiler" they really mean the C++ compiler, which for mingw is gcc.
你需要安装 Microsoft Visual C 编译器(2010 版)。并将其用作所有模块的编译器。您还可以弄乱 distuls.cfg 并以这种方式指定编译器。
You need to install the Microsoft Visual C compiler thingy (the 2010 one). And use that as your compiler for all modules. You can also mess with distuls.cfg and specify a compiler that way.