python module and pip command in shell
# list all the modules and their version in shell
pip list
# Global site-packages ("dist-packages") directories
python -m site
# check a module installed or not
python -c "import PyPDF2"
echo $? # if 0 means installed; if 1 means not isntalled