[英]ModuleNotFoundError: No module named 'twitter'
I am attempting to import a twitter api wrapper. 我正在尝试导入一个twitter api包装器。 I am using https://github.com/bear/python-twitter and have installed it using pip install python-twitter
, when I run pip freeze
into the command prompt it shows that I have python-twitter==3.2.1
installed however when I try to import it using import twitter
in Jupyter QTConsole running Python 3.6.0, I get back this error: 我正在使用https://github.com/bear/python-twitter并使用pip install python-twitter
安装它,当我在命令提示符下运行pip freeze
,它显示我安装了python-twitter==3.2.1
但是当我尝试在运行Python 3.6.0的Jupyter QTConsole中使用import twitter
导入它时,我收到了这个错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-645f6dc1896f> in <module>()
----> 1 import twitter
ModuleNotFoundError: No module named 'twitter'
I am at a loss as to what is going wrong, the package doesn't say it's restricted to a certain version of python, and searching online hasn't helped. 我不知道出了什么问题,包不说它仅限于某个版本的python,而且在线搜索没有帮助。 So now I am asking here in case anyone has a solution. 所以现在我在这里问以防万一有人有解决方案。
事实证明我安装了2个版本的Anaconda,并且该软件包默认为错误的版本,卸载旧版本的anaconda并重新安装软件包修复了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.