Answers for "bash check if python package is installed"

0

bash check if python package is installed

$ python2 -m doesnt_exist |& grep -q 'No module named' && echo 'Nope' || echo 'Yup'
Nope

$ python2 -m math |& grep -q 'No module named' && echo 'Nope' || echo 'Yup'
Yup
Posted by: Guest on June-25-2020

Code answers related to "bash check if python package is installed"

Python Answers by Framework

Browse Popular Code Answers by Language