In shell script I am checking whether this packages are installed or not, if not installed then install it. So withing shell script:
import nltk
echo nltk.__version__
but it stops shell script at import
line
in linux terminal tried to see in this manner:
which nltk
which gives nothing thought it is installed.
Is there any other way to verify this package installation in shell script, if not installed, also install it.
You can simply try
and that would give you a list like this
You can visually scan the list to find the version of all installed packages... the list is in alphabetical order, so it is easy to scan.
If you are in Anaconda
conda list
would do the same for you.