已安装Pandas-datareader,但无法调用

时间:2018-01-01 13:45:24

标签: python pandas-datareader

我正在使用带有Python 3.6的Windows,到目前为止,许多其他软件包都没有运行的问题。

我正在尝试安装&使用pandas-datareader,但在我成功安装后:

> C:\Python36\Scripts>pip3 install pandas-datareader Collecting
> pandas-datareader   Using cached
> pandas_datareader-0.5.0-py2.py3-none-any.whl Requirement already
> satisfied: requests>=2.3.0 in c:\python36\lib\site-packages (from
> pandas-datareader) Requirement already satisfied: requests-ftp in
> c:\python36\lib\site-packages (from pandas-datareader) Requirement
> already satisfied: pandas>=0.17.0 in c:\python36\lib\site-packages
> (from pandas-datareader) Requirement already satisfied: requests-file
> in c:\python36\lib\site-packages (from pandas-datareader) Requirement
> already satisfied: certifi>=2017.4.17 in c:\python36\lib\site-packages
> (from requests>=2.3.0->pandas-datareader) Requirement already
> satisfied: idna<2.7,>=2.5 in c:\python36\lib\site-packages (from
> requests>=2.3.0->pandas-datareader) Requirement already satisfied:
> urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from
> requests>=2.3.0->pandas-datareader) Requirement already satisfied:
> chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from
> requests>=2.3.0->pandas-datareader) Requirement already satisfied:
> numpy>=1.9.0 in c:\python36\lib\site-packages (from
> pandas>=0.17.0->pandas-datareader) Requirement already satisfied:
> pytz>=2011k in c:\python36\lib\site-packages (from
> pandas>=0.17.0->pandas-datareader) Requirement already satisfied:
> python-dateutil>=2 in c:\python36\lib\site-packages (from
> pandas>=0.17.0->pandas-datareader) Requirement already satisfied: six
> in c:\python36\lib\site-packages (from
> requests-file->pandas-datareader) Installing collected packages:
> pandas-datareader Successfully installed pandas-datareader-0.5.0

当尝试在 pycharm / jupyter 中运行它时,我会收到:

  

ModuleNotFoundError:没有名为&#39; pandas_datareader&#39;

的模块

当我在cmd命令中运行pip3 list时,我可以看到它已安装(pandas(0.22.0)pandas-datareader(0.5.0))。

我就这个问题找了很多答案,但仍无法解决这个问题。 此外,我确信该目录已添加到Windows路径。

1 个答案:

答案 0 :(得分:1)

在每个环境中,运行快速程序:

import sys 
for p in sys.path: 
    print(p). 

比较pip3安装pandas_datareader的路径,即c:\ python36 \ lib \ site-packages

您可能需要将其单独安装到PyCharm和jupyter