我尝试使用 easy_install
安装 pandas它声称它已成功在我的 Python 目录中安装了 pandas 包。
我切换到 IDLE 并尝试 import pandas
它抛出了以下错误 -
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pandas
File "C:\Python27\lib\site-packages\pandas-0.12.0-py2.7-win32.egg\pandas\__init__.py", line 6, in <module>
from . import hashtable, tslib, lib
File "numpy.pxd", line 157, in init pandas.hashtable (pandas\hashtable.c:20282)
ValueError: numpy.dtype has the wrong size, try recompiling
请帮我诊断错误。
仅供引用:我已经安装了 numpy
包
最佳答案
也许你中断了 pandas 安装,使用 pip 重试:
首先安装 pip(如果你还没有安装的话):
easy_install pip
然后重新安装 Pandas :
pip install pandas --upgrade
希望对你有帮助
关于python-2.7 - Pandas 导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17904600/