2
我已经尝试导入使用笔记本(Juypter)的nltk模块,但它一直显示错误。Juypter笔记本无法导入nltk模块?
ImportError Traceback (most recent call last)
<ipython-input-1-b06499430ee0> in <module>()
----> 1 import nltk
ImportError: No module named nltk.
我看了各种解决方案。我能够用终端导入模块,但不能在笔记本中导入。
您的终端Python安装和您的ipython安装是分开的。什么'输入sys; print(sys.path)'产生吗?或者'sys.executable'就可以了。 –
你可以在另一个环境中导入吗?例如ipython,python shell? –
@JimRaynor:是的,我可以在使用bash时在python shell甚至ipython中导入。 – Learner11