我正在导入 nltk,但它给出了以下错误。
Traceback (most recent call last):
File "/home/control/Work/Intelligence/Datasets/whats cooking/new.py", line 4, in <module>
import nltk
File "/usr/local/lib/python2.7/dist-packages/nltk-3.0.5-py2.7.egg/nltk/__init__.py", line 137, in <module>
from nltk.stem import *
File "/usr/local/lib/python2.7/dist-packages/nltk-3.0.5-py2.7.egg/nltk/stem/__init__.py", line 29, in <module>
from nltk.stem.snowball import SnowballStemmer
File "/usr/local/lib/python2.7/dist-packages/nltk-3.0.5-py2.7.egg/nltk/stem/snowball.py", line 25, in <module>
from nltk.stem import porter
ImportError: cannot import name porter
几天前我的 nltk 工作正常,我没有更新或更改任何内容,而且我还安装了所有 nltk 数据。