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

6

terminal python version

# in python
$ python --version

# in python3
$ python3 --version
Posted by: Guest on May-28-2020
1

how to check python version linux

python3 --version
Posted by: Guest on January-25-2021
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 in linux"

Python Answers by Framework

Browse Popular Code Answers by Language