heiset
heiset

Reputation: 1

Finding NLTK module in python

I'm trying to use the NLTK module in IDLE but it can't find the module—I noticed NLTK had downloaded to my system's default python directory for the 2.7 version, so I found the file path to the "site-packages" folder in 3.8 and copied NLTK there, but now when I try to "import NLTK" in python I get this error message:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import nltk
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nltk/__init__.py", line 99, in <module>
    from nltk.internals import config_java
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nltk/internals.py", line 28, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'

Upvotes: 0

Views: 253

Answers (1)

dexter103
dexter103

Reputation: 58

As I understand your intention is to use the NLTK package that you have installed for Python 2.7 , in Python 3.8, correct ?
In such case you shouldn't copy the library yourself, but rather use pip3 to install it once again into P3.8.

Upvotes: 1

Related Questions