Answers for "check python version ubuntu"

44

how to check python version

# To check your Python version in the command line use:
python --version

# To check your Python verson inside a script use:
import sys
print(sys.version)
Posted by: Guest on February-29-2020
1

check python version ubuntu

python3 --version
Posted by: Guest on January-25-2021
1

check all python versions ubuntu

# View as version vise:
for p in $(compgen -c python); do printf "%-16s" $p; $p --version; done
python2.7      Python 2.7.6
python3.4m     Python 3.4.3

# view as:
$ compgen -c python
python2.7
python3.4m
Posted by: Guest on March-07-2021
2

python version command notebook

import platform
print(platform.python_version())
Posted by: Guest on May-09-2020
0

python version installed in ubuntu

# check all python version install in ubuntu
$ ls /usr/bin/python* # for path and version
$ whereis python # for path and version
$ which python # for path
$ ls -lach /usr/bin/python
$ for p in $(compgen -c python); do printf "%-16s" $p; $p --version; done
Posted by: Guest on May-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language