pandas python 2.7 模块熊猫未安装“无法导入名称哈希表”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17128917/
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
python 2.7 module pandas not installing "cannot import name hashtable"
提问by downtempo
I tried looking for an answer to this around the forum/google, but I can't find anything. My issue is this (from python console):
我试图在论坛/谷歌周围寻找答案,但我找不到任何东西。我的问题是这个(来自 python 控制台):
>>> import pandas
cannot import name hashtable
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pandas\__init__.py", line 6, in <module>
from . import hashtable, tslib, lib
ImportError: cannot import name hashtable //also can't import name NaT somtimes
I ran the windows 1-click installer prior to attempting the import. I'm running everything 32-bit. The pandas installer is for python 2.7.
在尝试导入之前,我运行了 Windows 一键式安装程序。我正在运行所有 32 位。pandas 安装程序适用于 python 2.7。
Here's a list of modules that I have correctly imported into Python.
这是我已正确导入 Python 的模块列表。
- setuptools
- pip
- mox
- dateutil
- six
- numpy
- SQLAlchemy
- 设置工具
- 点
- 莫克斯
- 日期工具
- 六
- 麻木的
- SQLAlchemy
I'm on windows 7.
我在 Windows 7 上。
I also have anaconda installed, but that was really just a "hail mary" after I tried everything else. My end goal is to install the ultra-finance module. However, it seems to require pandas, hence me being stuck.
我也安装了 anaconda,但在我尝试了其他所有方法后,这真的只是一个“冰雹”。我的最终目标是安装超金融模块。但是,它似乎需要大Pandas,因此我被卡住了。
I'm a python noob, so please don't assume I know anything. Thanks.
我是一个蟒蛇菜鸟,所以请不要假设我什么都知道。谢谢。
EDIT: please let me know if I can provide any extra information.
编辑:如果我能提供任何额外的信息,请告诉我。
采纳答案by Andy Hayden
The recommended way to install pandasis via pip:
pip install pandas
This hashtables error arises from the cython files not being built. This error message will be more informative from 0.11.1.
此哈希表错误是由于未构建cython 文件引起的。此错误消息将从 0.11.1 开始提供更多信息。
回答by Eldorado
Try running your code in Spyder (Anaconda -> Spyder). It worked for me.
尝试在 Spyder 中运行您的代码(Anaconda -> Spyder)。它对我有用。
回答by DivideByZero
Check that you have python scripts included in your system path variable. In my case I had to add "C:\Python27\Scripts"
检查您的系统路径变量中是否包含 python 脚本。就我而言,我必须添加“C:\Python27\Scripts”
回答by user2723240
I was having a similar problem when downloading Pandas to my Windows 8 system. The first error I had was an egg error, but after installing some packages I think I have the solution.
将 Pandas 下载到我的 Windows 8 系统时,我遇到了类似的问题。我遇到的第一个错误是鸡蛋错误,但是在安装了一些软件包之后,我想我有了解决方案。
First look at the previous pip errors with Pandas, make sure you have the most updated pip.
首先查看 Pandas 之前的 pip 错误,确保您拥有最新的 pip。
The second part is downloading wheel using
第二部分是下载轮子使用
pip install wheel
After installing wheel and having the dependencies for panda and using pip it worked correctly.
安装轮子并拥有Pandas的依赖项并使用 pip 后,它可以正常工作。

