Install python3.8 on ubuntu

bongo-binary-logo how to install python 3.8 on ubuntu

This article will summarize the quick steps which are required to get the latest version of python as at the time of writing this article available on your (Ubuntu) machine. You may share with your friends to help them get the latest version of python. If you have a more simplified way of installing python 3.8 on ubuntu please let me know via the comment section bellow.

 

1. The very first step is to install the prerequisites requireds for installation

sudo apt-get install build-essential checkinstall

sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
    libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev


 

2. Use wget utility to download the python3.8 source code. We are going to place it on the opt folder so follow the steps to navigate and donwload python3.8 into the opt folder.  ubuntu opt folder is used for the installation of third party packages.

 

cd /opt

sudo wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz


 

3. After the completion of download process, you will have to extract content from the archive file using the tar utility. Use the following command to achieve that.

sudo tar xzf Python-3.8.0.tgz


 

4. Navigate to the extracted python3.8 source file to compile the source codes. Use the following commands.

cd Python-3.8.0

sudo ./configure --enable-optimizations

sudo make altinstall


 

5. Verify python3.8 existences , There are multiple ways of verifying existence of python3.8 on the ubuntu, we are going to use python3.8 --version, you may use python3.8 -V as well.

python3.8 --version


6. You may wish to delete the archive file which is still present on the /opt folder to save some spaces. This is optional as you may decide to move that file to another computer for installation. 

cd /opt
sudo rm -f Python-3.8.0.tgz