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