Python, one of the most popular programming language, is an object-oriented; high-level programming language. It first appeared in early 1990s. Guido van Rossum is the creator of the Python. Python Software Foundation oversees its development now. In this article, we cover how to install Python 3.11 in Ubuntu 22.04 release.
At the time of writing, Python v3.10.6 is available through standard Ubuntu repository. Therefore, to install Python v3.11.0 – first, we have to download the package from official website of Python. We cover that part in next section.
Note: Following operations require superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Download Python from official website
Visit – python.org
, on the homepage itself look for Downloads drop-drop down button at the top. Click All releases. Then, scroll down the page to look for a specific Python version. For us, it was v3.11.0. Open the Download web address right next to the Release date. And, scroll down the Downloads page. Then, download the Gzipped source tarball package. For us the package was – Python-3.11.0.tgz
The package is approximately 25 MBs in size. Next, we move to the installation part.
Install Python v3.11 in Ubuntu 22.04
We will be installing Python v3.11.0 alongside the version already installed through repository. Use tar command-line utility to extract the package –
cd /path/to/downloaded/package tar -xvf Python-3.11.0.tgz
It would create a directory – Python-3.11.0/
cd Python-3.11.0/
Next, issue following command to configure the package –
./configure make make test
To install Python v3.11.0 alongside the already installed Python version from standard Ubuntu repository –
sudo make altinstall
To verify the installed version –
python3.11 --version
It would return with –
Python 3.11.0
In conclusion, we have covered how to install Python v3.11 in Ubuntu 22.04 here.