How to check a Python module installed or not

To check whether a Python module is installed or not,

#python -c "import module"
#echo $?

Here we need to replace module with the name of the module. In the result is zero, module is installed otherwise module is not installed.


Leave a Reply

Your email address will not be published. Required fields are marked *