I need to have ubuntu to have python 3.7 installed by default on a fresh installation. I download 18.04 with python 3.6 default and 20 with 3.8. Is there a version in between with python 3.7?
33 Answers
Simple Answer : Ubuntu 19.04 and Ubuntu 19.10 come with Python 3.7 as default Python version.
4Do you need it installed by default or just the ability to install it? Using the deadsnakes PPA is the defacto standard way of installing "other" Python versions on Ubuntu. To install Python 3.7, simply do sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt update && apt install python3.7 on any currently supported Ubuntu release.
As others have pointed out, no currently supported version of Ubuntu has Python 3.7 out of the box.
Since the only Ubuntu releases to have had Python 3.7 as the default install are now end-of-life, I would suggest using a Python version manager such as PyEnv. This is a tool that allows you to install and use multiple Python versions and switch between them.
Installation is a little involved, but you can find detailed instructions here: Managing Multiple Python Versions With pyenv
You can also find their Github page here and another page with installation instructions here.
The installation will involve setting up a bunch of build dependencies, since PyEnv installs its python versions direct from source, and then running an installation script.