I am trying to execute this code in pycharm
import nltk
sentence = """ we all are gonna die"""
tokens = nltk.word_tokenize(sentence)
print(tokens)
But I keep getting this error
/Users/yoshithKotla/pythonProject/bin/python /Users/yoshithKotla/Desktop/pythonProject/main.py
Traceback (most recent call last):
File "/Users/yoshithKotla/Desktop/pythonProject/main.py", line 1, in <module>
ModuleNotFoundError: No module named 'nltk'
But I am able to run the same code using terminal