嗨,我一直在尝试为Jupyter Notebook安装twython。我已经通过python repl证明,它已在笔记本电脑中普遍安装。但是它仍然不会出现在Jupyter Notebook上。在我的Anaconda 3 Jupyter Notebook可以找到的地方找到了试图找出问题的帮助。
上下文:作业分配试图挖掘Twitter的推文
这是我收到的错误,我正在运行Mac OS
/Users/rachelmanca/twitter/__init__.py:22: UserWarning: The twython library has not been installed. Some functionality from the twitter package will not be available.
"The twython library has not been installed. "
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-38297a1141e0> in <module>
----> 1 import twitter
2 import twython
3 #---------------------------------------------
4 # Define a Function to Login Twitter API
5 def oauth_login():
~/twitter/__init__.py in <module>
34
35
---> 36 from nltk.twitter.common import json2csv
ModuleNotFoundError: No module named 'nltk.twitter
答案 0 :(得分:0)
您已经安装了nltk软件包吗?
否则,请执行以下操作:
pip3 install -U nltk
python3
在python3命令行中运行:
import nltk
nltk.download()