You can use python -V (et al.) to show you the version of Python that the python command resolves to. If that's all you need, you're done. But to see every version of python in your system takes a bit more.

In Ubuntu we can check the resolution with readlink -f $(which python). In default cases in 14.04 this will simply point to /usr/bin/python2.7.

We can chain this in to show the version of that version of Python:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/usr/bin/python2.7: Python 2.7.6

But this is still only telling us what our current python resolution is. If we were in a Virtualenv (a common Python stack management system) python might resolve to a different version:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4

This is real output.

The fact is there could be hundreds of different versions of Python secreted around your system, either on paths that are contextually added, or living under different binary names (like python3).

If we assume that a Python binary is always going to be called python<something> and be a binary file, we can just search the entire system for files that match those criteria:

$ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; | awk -F: '/x-executable; charset=binary/ {print $1}' | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4
/media/ned/websites/venvold/bin/python: Python 2.7.4
/srv/chroot/precise_i386/usr/bin/python2.7: Python 2.7.3
/srv/chroot/trusty_i386/usr/bin/python2.7: Python 2.7.6
/srv/chroot/trusty_i386/usr/bin/python3.4: Python 3.4.0
/srv/chroot/trusty_i386/usr/bin/python3.4m: Python 3.4.0
/usr/bin/python2.7: Python 2.7.6
/usr/bin/python2.7-dbg: Python 2.7.6
/usr/bin/python3.4: Python 3.4.0
/usr/bin/python3.4dm: Python 3.4.0
/usr/bin/python3.4m: Python 3.4.0
/web/venvold/bin/python: Python 2.7.4

It's obviously a pretty hideous command but this is again real output and it seems to have done a fairly thorough job.

Answer from Oli on askubuntu.com
Top answer
1 of 9
116

You can use python -V (et al.) to show you the version of Python that the python command resolves to. If that's all you need, you're done. But to see every version of python in your system takes a bit more.

In Ubuntu we can check the resolution with readlink -f $(which python). In default cases in 14.04 this will simply point to /usr/bin/python2.7.

We can chain this in to show the version of that version of Python:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/usr/bin/python2.7: Python 2.7.6

But this is still only telling us what our current python resolution is. If we were in a Virtualenv (a common Python stack management system) python might resolve to a different version:

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4

This is real output.

The fact is there could be hundreds of different versions of Python secreted around your system, either on paths that are contextually added, or living under different binary names (like python3).

If we assume that a Python binary is always going to be called python<something> and be a binary file, we can just search the entire system for files that match those criteria:

$ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; | awk -F: '/x-executable; charset=binary/ {print $1}' | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'
/home/oli/venv/bin/python: Python 2.7.4
/media/ned/websites/venvold/bin/python: Python 2.7.4
/srv/chroot/precise_i386/usr/bin/python2.7: Python 2.7.3
/srv/chroot/trusty_i386/usr/bin/python2.7: Python 2.7.6
/srv/chroot/trusty_i386/usr/bin/python3.4: Python 3.4.0
/srv/chroot/trusty_i386/usr/bin/python3.4m: Python 3.4.0
/usr/bin/python2.7: Python 2.7.6
/usr/bin/python2.7-dbg: Python 2.7.6
/usr/bin/python3.4: Python 3.4.0
/usr/bin/python3.4dm: Python 3.4.0
/usr/bin/python3.4m: Python 3.4.0
/web/venvold/bin/python: Python 2.7.4

It's obviously a pretty hideous command but this is again real output and it seems to have done a fairly thorough job.

2 of 9
68

Type following in the terminal (Ctrl+Alt+T):

python -V

or

python --version

You can find a list of options/parameters for many commands in the terminal by typing the command followed by --help

Example:

python --help

Manual/manpages also available for most of such CLI which can be displayed by man <command> (Ex: man python)

From man python:

COMMAND LINE OPTIONS
        -V ,  --version
              Prints the Python version number of the executable and exits.

There is also python3 installed on many machines, so you can do:

python3 --version

to find out what python 3.x you are running.

🌐
Python.org
discuss.python.org › python help
Install python 3.11.9 on ubuntu - Python Help - Discussions on Python.org
According to this page: 'Python 3.11.9 is the newest major release of the Python programming language". Can I install Python 3.11.9 in my Virtual Machine? I have installed guest VM ubuntu-22.04.4-desktop-amd64.iso on…
Published   April 16, 2024
🌐
Isaac Lab
isaac-sim.github.io › IsaacLab › main › source › setup › installation › index.html
Local Installation — Isaac Lab Documentation
Drivers other than those recommended on Omniverse Technical Requirements may work but have not been validated against all Omniverse tests. Use the latest NVIDIA production branch driver. On Linux, version 580.65.06 or later is recommended, especially when upgrading to Ubuntu 22.04.5 with kernel ...
🌐
RoseHosting
rosehosting.com › home › how to install and switch python versions on ubuntu 20.04
How to Install and Switch Python Versions on Ubuntu 20.04 | RoseHosting
October 5, 2022 - In the first step of this tutorial we are going to install the default Python2 and Python3 versions in Ubuntu 20.04.
🌐
Ubuntu
documentation.ubuntu.com › ubuntu-for-developers › reference › availability › python
Available Python versions - Ubuntu for Developers
June 4, 2025 - Ubuntu Python 3 (deb) packages:,,, Ubuntu version, available Python 3 versions, python3-defaults version,,, 25.10 (Questing Quokka), 3.13, 3.14, 3.13,, 25.04 (Plucky Puffin), 3.13, 3.13,, 24.10 (Or...
🌐
Playwright
playwright.dev › installation
Installation | Playwright Python
Python 3.8 or higher. Windows 11+, Windows Server 2019+ or Windows Subsystem for Linux (WSL). ... Debian 12, Debian 13, Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
Find elsewhere
🌐
Medium
medium.com › @alluaravind1313 › python-version-upgrading-in-ubuntu-4092542b27bd
Python Version Upgrading in Ubuntu | by ARAVIND ALLU | Medium
June 15, 2020 - Python Version Upgrading in Ubuntu As of now, Python 3.8. 3, documentation released on 13 May 2020 is the latest version of python. By default, ubuntu gives the python 2.7 version, if you need to …
🌐
Medium
medium.com › @kameshwarasekar › managing-multiple-python-versions-on-ubuntu-pop-os-eae4d0bf3171
Managing multiple Python versions on Ubuntu/Pop!_OS | by Kameshwarasekar | Medium
November 3, 2023 - One such instances I faced was when there wasn’t a proper reference to Python or conflicting Python references, I wasn’t even able to open my Terminal :(. Like this, some of the core tools and applications of Ubuntu depend on Python, thus if you mess up Python, it might break Ubuntu. ... Using Pyenv: Pyenv is the most popular option to work with multiple Python versions on Ubuntu, there are a lot of resources available on the internet which provides information on how to setup and work with pyenv.
🌐
Aider
aider.chat › docs › install.html
Installation | aider
You can use pip to install aider with python versions 3.9-3.12.
🌐
Hackers and Slackers
hackersandslackers.com › multiple-python-versions-ubuntu-20-04
Managing Multiple Versions of Python on Ubuntu 20.04
August 20, 2023 - Code boot camps and tutorials do ... is the first LTS version of Ubuntu to drop Python2, coming fresh out of the box with Python 3.8.5....
🌐
Python
python.org › downloads › release › python-3130
Python Release Python 3.13.0 | Python.org
A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode.
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-python-in-ubuntu
How to install Python in Ubuntu (3 Methods to install ) - GeeksforGeeks
July 23, 2025 - However, if it's not available or you want to install a specific version, follow any of the methods below. Note: Python 3 is typically pre-installed in Ubuntu, especially in versions like 20.04, 22.04, and 24.04.
🌐
Quora
quora.com › How-do-you-check-if-Python-is-installed-in-Ubuntu
How to check if Python is installed in Ubuntu - Quora
Python 3 is preinstalled on Ubuntu, but there’s no IDE. You can install IDLE with sudo apt install idle. IDLE is a pretty basic IDE but it does the job. It’s not complicated like Spyder and such.
🌐
Linux Stans
linuxstans.com › how-to-install-python-ubuntu
How to Install Python on Ubuntu - Linux Stans
January 24, 2022 - You can use the deadsnake repository to get a newer release of Ubuntu, aside from the ones that are in Ubuntu’s default repositories. ... Now that you’ve added the PPA, you can install any newer version of Python.
🌐
UltaHost
ultahost.com › knowledge-base › check-python-version-linux-windows
How to Check Python Version in Linux & Windows | Ultahost Knowledge Base
November 30, 2024 - Learn how to check Python version in Linux and Windows with commands. Ensure you have the correct Python version installed for your projects.
🌐
PyTorch
pytorch.org › get-started › locally
Get Started
Python 3.10-3.14 is generally installed by default on any of our supported Linux distributions, which meets our recommendation. Tip: By default, you will have to use the command python3 to run Python.
🌐
Google
docs.cloud.google.com › google cloud sdk › quickstart: install the google cloud cli
Quickstart: Install the Google Cloud CLI | Google Cloud SDK | Google Cloud Documentation
2 weeks ago - Confirm that you have a supported version of Python. The Google Cloud CLI requires Python 3.10 to 3.14. The x86_64 Linux package includes a bundled Python interpreter that will be preferred by default.
🌐
Ask Ubuntu
askubuntu.com › questions › tagged › python
Newest 'python' Questions - Ask Ubuntu
... System Information: Ubuntu Version: 25.10 VS Code Version: Latest Python Version: 3.13.7 Jupyter Extension: ms-toolsai.jupyter (Microsoft) Problem Summary: VS Code's Jupyter extension fails to ...