Rather than building from source or using packages from different Ubuntu versions I would recommend using the Deadsnakes PPA. This provides both newer and older versions of Python than are in the Ubuntu archive, and keeps those versions up to date with bugfix releases.

Answer from dom1310df on askubuntu.com
🌐
Linuxize
linuxize.com › home › python › how to install python 3.7 on ubuntu 18.04
How to Install Python 3.7 on Ubuntu 18.04 | Linuxize
October 15, 2019 - This tutorial describes two ways of installing Python 3.7 on Ubuntu 18.04: By using the standard apt tool from the deadsnakes PPA, and by building from the source code.
🌐
TecAdmin
tecadmin.net › install-python-3-7-on-ubuntu-linuxmint
How To Install Python 3.7 on Ubuntu, Debian & LinuxMint - TecAdmin
April 26, 2025 - How to Install Python 3.7.4 on Ubuntu & LinuxMint. Step by Step instructions to install Python 3.7 on Ubuntu, Debian, and LinuxMint Systems.
Discussions

I need to use python 3.7 but Ubuntu 20.4 comes with 3.8 pre-installed - can I install it with apt-get alongside 3.8?
In your case, I would install anaconda to not rely on the system installed python packages. You could have any version you wanted. More on reddit.com
🌐 r/Ubuntu
6
3
July 9, 2020
how to install python 3.7 on ubuntu 21.04? thx
21.04 is EOL. More on reddit.com
🌐 r/Ubuntu
7
0
March 15, 2022
Help with installing python 3.7
Which Distro are you running on the Pi? Maybe you need to add a repository first if no python 3.7 is available in the default repos. Also check which Version of python do you have by putting this in a Script and run it: https://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script#1093331 More on reddit.com
🌐 r/linux4noobs
7
2
April 27, 2020
When can we expect Python 3.10 in Anaconda?

It was added to the conda-forge channel 7 hours ago. You can install it with

conda install -c conda-forge python=3.10
More on reddit.com
🌐 r/Python
13
13
October 5, 2021
🌐
Python
python.org › downloads
Download Python | Python.org
Python 3.13.13 April 7, 2026 Download Release notes · Python 3.13.12 Feb. 3, 2026 Download Release notes · Python 3.13.11 Dec. 5, 2025 Download Release notes · Python 3.13.10 Dec. 2, 2025 Download Release notes
🌐
UbuntuHandbook
ubuntuhandbook.org › home › howtos › how to install python 3.7.2 in ubuntu 18.04 / 18.10
How to Install Python 3.7.2 in Ubuntu 18.04 / 18.10 | UbuntuHandbook
If I want something to run with Python 3.7, then I call it directly: ... $ apt install python-virtualenv $ virtualenv -p /usr/bin/python3.7 venv37 $ source ./venv37/bin/activate [venv37] $ Shotcut 26.6 Released! OpenFX / VST2 Filters Support & HDR PreviewJune 27, 2026 · Ubuntu 26.10 Snapshot 2 ...
🌐
GitHub
gist.github.com › j40903272 › a4b715b79b2e5aa74342fe995a1c1ef9
Install python3.7 · GitHub
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 sudo update-alternatives --config python3 ... sudo apt-get install -y build-essential ...
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install python 3 on ubuntu
How to Install Python 3 on Ubuntu | phoenixNAP KB
February 5, 2025 - Deadsnakes is a PPA with newer releases than the default Ubuntu repositories. Add the PPA by running the following: ... The system prompts you to press Enter to continue. Update the package lists again once the process completes: ... The Deadsnakes PPA has many Python versions in its database and allows you to install older versions as well. Specify the version in the package name to install that version. For example, run this command to install Python 3.12:
Find elsewhere
🌐
DedicatedCore
dedicatedcore.com › home › how to install python 3 on ubuntu 20.04
How to Install Python 3 on Ubuntu 20.04 - DedicatedCore Blog
October 16, 2024 - To establish a second Python 3.835 installation, incorporate the following into your current Python installation: ... You should employ the altinstall technique. Software packages on your Ubuntu system can be dependent on Python 2.x.
🌐
Tutorials24x7
tutorials24x7.com › python › how-to-install-python-37-on-ubuntu-1804-lts
How To Install Python 3.7 On Ubuntu 18.04 LTS | Tutorials24x7
September 11, 2019 - We can install the Python using the package available at the Ubuntu repositories using the commands as shown below. # Refresh the packages index sudo apt update # Prerequisites sudo apt install python # Verify Installation python --version # ...
🌐
Reddit
reddit.com › r/ubuntu › i need to use python 3.7 but ubuntu 20.4 comes with 3.8 pre-installed - can i install it with apt-get alongside 3.8?
r/Ubuntu on Reddit: I need to use python 3.7 but Ubuntu 20.4 comes with 3.8 pre-installed - can I install it with apt-get alongside 3.8?
July 9, 2020 -

Sorry for the dumb question. Just installed a fresh Ubuntu 20.4 after a couple of years of not touching Linux. I thought I could just sudo apt-get install python3.7 but that doesn't work.

I'd love to be able to use apt-get to minimize the chances I fuck something up, can I do this without having to download and compile it myself?

More specifically:

When I sudo apt-get install python 3.7 I don't get any errors or anything, I just get the following:

$ sudo apt-get install python3.7
[sudo] password for j: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'python3.7-2to3' for regex 'python3.7'
Note, selecting 'libpython3.7-stdlib' for regex 'python3.7'
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

Then when I python3.7 I get:

$ python3.7

Command 'python3.7' not found, did you mean:

  command 'python2.7' from deb python2.7 (2.7.18~rc1-2)
  command 'python3.8' from deb python3.8 (3.8.2-1ubuntu1.1)

Try: sudo apt install <deb name>

And if I look in /usr/bin/:

$ ls /usr/bin/ | grep python
python3
python3.8

And:

$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       9 júl  8 23:57 /usr/bin/python3 -> python3.8
-rwxr-xr-x 1 root root 5457536 apr 27 15:53 /usr/bin/python3.8
🌐
TecMint
tecmint.com › home › linux distros › ubuntu › how to install latest python version in ubuntu
How to Install Latest Python 3.11 in Ubuntu
August 10, 2023 - $ sudo apt install python3.10 $ sudo apt install python3.9 $ sudo apt install python3.8 $ sudo apt install python3.7 $ sudo apt install python3.6 · To view a list of all Python binaries installed on your system, run the following ls command.
🌐
Ubuntu
documentation.ubuntu.com › ubuntu-for-developers › reference › availability › python
Available Python versions - Ubuntu for Developers
April 5, 2026 - This page lists Python versions available in Ubuntu releases. Ubuntu Python 3 (deb) packages:,,, Ubuntu version, available Python 3 versions, python3-defaults version,,, 25.10 (Questing Quokka), 3....
🌐
GitHub
gist.github.com › simonw › 7d391ec1fdddd730e0075d963da65f1f
How to run Python 3.7 on Ubuntu 16.04 · GitHub
First, you need to install Python 3.7 (you will currently have Python 3.5.2): sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.7
🌐
GitHub
gist.github.com › Sdoof › 6c6b38fe238cea5768b50ce4def7c6c3
Install Python 3.7 and pip, pipenv on Ubuntu 18.04 (works on WSL).md · GitHub
Register both Python 3.7 and and preinstalled Python 3.6 to python3 alternatives. sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
🌐
Linux Today
linuxtoday.com › home › developer
How to Install Python 3.7 on Ubuntu 22.04
September 7, 2023 - In this guide, you will learn two straightforward methods for installing Python 3.7 on Ubuntu 22.04 Jammy Jellyfish.