0

I keep getting this error when I am trying to import NLTK—

import nltk
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import nltk
ModuleNotFoundError: No module named 'nltk'

I am very new to this. I found a few similar answers, but I tried the solutions and they didn't work. The closest I got to was here—Python can't find module NLTK, however the last part the user mentions

Answer here—

then run the right Python instance from /usr/local/bin or update your PATH system variable.

However, I have no idea what that means and how to do it.

Here are my paths for python and pip, but I am not sure what to do after that. I am on a Mac.

Thanks, any help would be appreciated!

Brian P
  • 1
  • 3

1 Answers1

0

First you need install NLTK.

Execute in command prompt:

Pip install nltk

After you need download nltk packages:

in python console run this command:

import nltk

nltk.download()

And select the option "all" packages to download. When download finish you can use the nltk