导入pandas时缺少依赖项(numpy)

时间:2017-06-20 15:08:30

标签: python pandas numpy

我正在使用Python教程,其中使用了pandas,我遇到了一个我无法弄清楚的依赖性问题。

要安装pandas,我跑了:

pip install pandas

但是当我打开python会话并尝试导入pandas时,我收到一条错误消息“缺少必需的依赖项('numpy')”,尽管我在运行pip命令安装pandas时看到它已经安装了。

帮助将不胜感激。感谢。

编辑:发布以下完整错误消息:

PS C:\Python> python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\user1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

1 个答案:

答案 0 :(得分:1)

尝试安装Anaconda 3(适用于Windows和Linux),它包含所有有用的库,如panda,numpy ......所以你不必自己下载或重建