I am trying to install nltk package on my machine, it encounter the following error:
!pip3 install nltk
import nltk
nltk.download('punkt')
nltk.download('wordnet')
nltk.download('stopwords')
nltk.download('abc')
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
Requirement already satisfied: nltk in /usr/local/lib/python3.9/site-packages (3.6.1)
Requirement already satisfied: regex in /usr/local/lib/python3.9/site-packages (from nltk) (2021.4.4)
Requirement already satisfied: tqdm in /usr/local/lib/python3.9/site-packages (from nltk) (4.60.0)
Requirement already satisfied: joblib in /usr/local/lib/python3.9/site-packages (from nltk) (1.0.1)
Requirement already satisfied: click in /usr/local/lib/python3.9/site-packages (from nltk) (7.1.2)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-15-e70099103d37> in <module>
1 get_ipython().system('pip3 install nltk')
----> 2 import nltk
3 nltk.download('punkt')
4 nltk.download('wordnet')
5 nltk.download('stopwords')
ModuleNotFoundError: No module named 'nltk'
I have never had a problem with my package installing till now.. I don't know why it happens, is it because I am using python 3.9?