Reputation: 35
I am new to python and struggling to make code removing stop words and special characters from a file without using nltk. I tried reading and taking ideas from other questions but none helped me.
Also, I tried installing nltk in PyCharm and importing it
import nltk
but it says:
ModuleNotFoundError: No module named 'nltk'
Can anyone help me with this? Thank you so much
Upvotes: 0
Views: 380
Reputation: 762
If you're using python2.7, install it from terminal running : pip install nltk
Otherwise, for python 3, just run pip3 install nltk
If you meet this kind of error
just run nltk.download('punkt')
(or whatever you see in the error, here I got punkt) from our python console
You shouldn't see any importError now
Upvotes: 2