Error importing NLTK on PyCharm

后端 未结 3 462
眼角桃花
眼角桃花 2021-01-24 22:06

I\'m trying to import NLTK in PyCharm, and get the following error. I\'m on Mac OS 10.5.8 with Python 2.7.6. What could be going on? I\'m completely new to programming, so sorry

3条回答
  •  独厮守ぢ
    2021-01-24 22:43

    I use PyCharm but never install packages through PyCharm, I always use Terminal and install them with mostly pip or easy_install (in my virtual environment). Maybe you can just install the package from terminal..

    sudo pip install nltk (https://pypi.python.org/pypi/nltk)

    or

    sudo easy_install nltk (if you don't have pip installed)

    And then in PyCharm, make sure in preferences you set your Project Interpreter to the python path with your installed packages.

提交回复
热议问题