为 Python 2.7 64 位安装 Pandas - 无法找到 vcvarsall.bat 的错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18989514/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 21:11:16  来源:igfitidea点击:

Installing Pandas for Python 2.7 64 bit - Error unable to find vcvarsall.bat

python-2.7windows-8numpypandasenthought

提问by user1350191

I am trying to install the pandas module. I tried an installer before but when importing I got some cryptic errors. I read that using pip is the recommended way to install packages.

我正在尝试安装 pandas 模块。我之前尝试过安装程序,但在导入时出现了一些神秘的错误。我读到使用 pip 是安装软件包的推荐方式。

When I use pip install pandasit manages to install pandas, dateultils and another package but when it arrives to numpy it exits with the error "Unable to find vcvarsall.bat".

当我使用pip install pandas它时,它设法安装了 pandas、dateutils 和另一个包,但是当它到达 numpy 时,它以错误退出"Unable to find vcvarsall.bat"

Of course, I searched for this problem which seems to be very common. However, none of the solution listed (several and not very clear/consistent worked). I have a Visual Studio 8 folder in program files. I also installed VS 2012 express which added a Visual Studio 11 folder. The only vcvarsall.bat that I found is in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC.

当然,我搜索了这个似乎很常见的问题。但是,没有列出任何解决方案(有几个并且不是很清楚/一致)。我在程序文件中有一个 Visual Studio 8 文件夹。我还安装了 VS 2012 express,它添加​​了一个 Visual Studio 11 文件夹。我发现的唯一 vcvarsall.bat 位于C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC.

I added that folder to the path to no avail. I also installed mingw and added c:mingw/binto the path. Nothing. I have a distutils.cfg with the compiler=mingw32set already. I did not create it or modified it. It was already there. It puzzles me because my python dist and all modules should be 64 bit. I have a EPD python built on this laptop. I run Win8 that I read seems to be harder to manage.

我将该文件夹添加到路径无济于事。我还安装了 mingw 并添加c:mingw/bin到路径中。没有。我已经有一个带有compiler=mingw32set的 distutils.cfg 。我没有创建或修改它。它已经在那里了。这让我很困惑,因为我的 python dist 和所有模块都应该是 64 位的。我在这台笔记本电脑上构建了一个 EPD python。我运行的 Win8 似乎更难管理。

There seem to be several ways but none is exactly clear and the above did not work for me at all.

似乎有几种方法,但没有一个是完全清楚的,以上对我来说根本不起作用。

Please, if you know how to help, write a step-by-step way to and explain the rationale behind it. For example, in other threads, people suggest to add this variable or another one, or this to the path, or that, and it's not clear why and it seems to depend on a particular system. I am not sure what I should do indeed.

请,如果您知道如何提供帮助,请写出分步方法并解释其背后的基本原理。例如,在其他线程中,人们建议添加此变量或另一个变量,或将其添加到路径中,或添加到路径中,但不清楚为什么,似乎取决于特定系统。我不确定我确实应该做什么。

Thanks!

谢谢!

回答by alansendgi

You should be able to install numpy using

您应该能够使用安装 numpy

easy_install numpy

easy_install numpy

I had the same problem using pip, until I saw thisarticle. It works!

我在使用 pip 时遇到了同样的问题,直到我看到了这篇文章。有用!