Install Python 3.8.0 in Ubuntu 19.10

We would discuss how to install Python 3.8.0 in Ubuntu 19.10 release. On October 14, 2019 – Python got its latest stable release i.e. v3.8.0. Few of new features include – typed_ast is now merged to CPython, to improve performance – Protocol 4 is used by pickle by default, continue is now supported in finally: block and compiled bytecode gets parallel filesystem among others. In addition to, LOAD_GLOBAL is now 40% faster than before. To know more about all the new features introduced in detail, visit Python docs and look for whats new is there in Python 3.8.0.

Although Python package comes installed in Ubuntu distribution by default. But, the version installed may vary for different Ubuntu releases. In this article, we would install a version of Python alongside the Python package already installed by default.

Note: Following operations would require you to have superuser privileges. In case you don’t have one, then contact your System Administrator for assistance.

Install Python 3.8.0 in Ubuntu 19.10

First, download the relevant package from the official website itself. Thereafter, extract the downloaded package and perform operations as mentioned below.

Visit the Downloads section on the Python’s official website. Scroll down the page and click 3.8.0 (Release version), and download the file version – Gzipped source tarball. The file so downloaded – Python-3.8.0.tgz is of around 23 MBs in size. Now, open a terminal and extract Python-3.8.0.tgz file through tar command-line utility –

cd /Path/to/Python-3.8.0.tgz
tar -xvf Python-3.8.0.tgz

This creates a folder – Python-3.8.0 in current directory.

cd Python-3.8.0/

And, issue the following three commands –

./configure
make
make test

Now, to keep the default installed Python version and install Python v3.8.0 alongside the installed version. Therefore, run the following command –

sudo make altinstall

When the command finishes installing the package, it will return with the following output –

Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0

Lastly, open a new terminal and issue –

python3.8 -V

It will show the Python version (i.e. Python 3.8.0) installed.

To open REPL (Read-Evaluate-Print-Loop) Shell, run the following in terminal –

python3.8

In conclusion, we have a discussed bit about whats all new in latest stable release of Python. And, then we discussed the installation steps required to install Python 3.8.0 in Ubuntu 19.10 release.