Hi I tried to install nltk from the vscode terminal which is said to be successful but I am still not able to import nltk on python. It said 'no module named'nltk''.
I attached my screenshot for clearer picture of my work. Thanks!
Make sure that the console enters the environment you are using.
Since the environment you choose in Jupyter is "myenv":conda
, select this environment in the lower left corner of VSCode, and use the shortcut key Ctrl+Shift+` to open a new terminal, VSCode will automatically enter the environment you selected. (You can refer to my screenshot: Result)
Install the module "nltk
" in the current environment. pip install nltk
or pip3 install nltk
Result:
check:
Check the source of the installation tool pip
, the installed package is placed in this environment.
Check the installation package: "pip list
"
If you encounter any problems, please let me know.