繁体   English   中英

Python错误导入已安装模块

[英]Python error importing already install module

我在使用Python成功安装模块时遇到了一个错误,但没有加载它。

当前,我在Windows 7的Juptyer笔记本中使用Python 3.5.1和Anaconda 2.4.1(64位)。

我运行了pip install quandl ,它已成功完成。 如果我再次运行它,我得到

> Requirement already satisfied (use --upgrade to upgrade): quandl in
> c:\users\crushee\anaconda3\lib\site-packages

另外,当我运行pip freeze时,还会列出quandl模块

当我在笔记本中运行sys.path它还会返回相同的安装目录。 我还将此目录添加到Windows中的PYTHONPATH系统变量中

> ['',  'C:\\Users\\crushee\\Anaconda3\\Lib', 
> 'c:\\users\\crushee\\anaconda3\\lib\\site-packages\\setuptools-19.1.1-py3.5.egg',
> 'C:\\Users\\crushee\\Anaconda3\\Lib\\site-packages\\

但是,当我尝试import quandl它返回错误

ImportError                               Traceback (most recent call last)
<ipython-input-5-ab7fa5ad38a5> in <module>()
----> 1 import quandl

ImportError: No module named 'quandl'

最后是如果我尝试以详细模式导入的输出

Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
File "<frozen importlib._bootstrap>", line 969, in > _find_and_load 
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked   ImportError: No module name 'quandl'

任何帮助将不胜感激

尝试:

import Quandl

您可能会遇到其他软件包的其他导入错误(例如我遇到了pandas导入错误。因此,请安装pandas )。 它以Quandl形式安装在/usr/local/lib/<python>/dist-packages

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM