我尝试在我的Windows 8.1上安装ephem模块
pip install ephem
但我得到这个错误:
Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
我正在使用Python 3.4.3请告诉我我应该做些什么来使这项工作 . 我经历了很多解决方案,但它没有帮助我 .
这些是一些:
Error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)
Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions
2 回答
我刚刚执行了以下步骤,并能够通过pip安装扩展 . 我正在使用Windows 8.1 x64 .
使用x86安装程序安装最新的Python 3版本 . (x64更难,因为VS不包含x64的编译器,请参阅第二个答案here)
安装可以从Microsoft下载的Visual C Studio 2010 Express(按照this链接,Visual Studio 2010下载位于页面底部 . 您需要下载C版本,我认为您必须在Microsoft注册才能够下载软件) .
运行
py -3 -m pip install ephem
到istall ephem . (py -3 -m pip
从你的python 3安装中调用pip,如果你还安装了python 2,也很有帮助)为我工作没有任何问题 .
更新2017:
请参阅以下链接,其中包含有关在Windows上编译python的信息:
https://wiki.python.org/moin/WindowsCompilers
我有同样的问题,在这里找到了最佳解决方案:http://www.devdungeon.com/content/fix-pip-install-unable-find-vcvarsallbat
它说:
因此,转到命令窗口并运行以下命令:
我希望它能帮助其他用户 .