Question
What Versions Of Python Are Available In Our System Repositories?
System repositories refer to the official repositories that are automatically available on your system when you first install a specific distribution. They vary from distribution to distribution and in most cases they only host the stable versions of most packages and not the most update-to-date ones and that also includes Python. That means if a certain version of Python, or any package, is not available in the official system repositories then you either need to manually install the version you wish to, possibly might even have to build the package from source, or there might be a chance that the version you wish to install has already been made available in some vendor-specific repository which you need to install on your server separately.
Nevertheless, here we would only list those python versions are that are currently available in official system repositories of CentOS7/8 and Ubuntu 20.04.
Answer
- - - - - - - - - - - - - - - - - - - - - - - - - -
CentOS 7:
Here are all the python packages available in CentOS 7 repositories along with the version, build number and the name of the repository:
[python] [2.7.5] [89.el7] [base]
[python] [2.7.5] [90.el7] [updates]
[python34] [3.4.10] [8.el7] [epel]
[python3] [3.6.8] [17.el7] [base]
[python3] [3.6.8] [18.el7] [updates]
Note: You might need to install the epel-release repository if it's not available on your system with the following command:
yum install epel-release
- - - - - - - - - - - - - - - - - - - - - - - - - -
CentOS 8:
And here are the versions available in CentOS 8 official repositories:
[python2] [2.7.18] [4.module_el8.4.0+668+03e3490a] [appstream]
[python36] [3.6.8] [2.module_el8.4.0+790+083e3d81] [appstream]
[python38] [3.8.6] [3.module_el8.4.0+665+abc3a503] [appstream]
[python39] [3.9.2] [1.module_el8.4.0+720+bfbc1bcb] [appstream]
- - - - - - - - - - - - - - - - - - - - - - - - - -
Ubuntu 20.04:
And finally these are the currently available versions in Ubuntu's official repositories along with the version number, build number and the origin repository name:
[python2] [0.8.12] [2.7.17-2ubuntu4] [Ubuntu:20.04/focal [amd64]]
[python2.7] [0.8.12] [2.7.18-1~20.04.1] [Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]]
[python3] [0.8.12] [3.8.2-0ubuntu2] [Ubuntu:20.04/focal [amd64]]
[python3.8] [0.8.12] [3.8.10-0ubuntu1~20.04] [Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]]
[python3.9] [0.8.12] [3.9.5-3~20.04.1] [Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64]]
Note: Cloudlinux, Almalinux and other supported distributions all have their own, different, official repositories, so the available versions of python might be different from these shown here.