Answers for "how to check if python is installed on linux"

1

check python version kali linux

$ python2 --version
Posted by: Guest on November-09-2020
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 "how to check if python is installed on linux"

Python Answers by Framework

Browse Popular Code Answers by Language