How to Install Python 3.9.3 Update on Ubuntu 20.04 LTS

Today we learn How to install Python on Ubuntu , Welcome to itsFoss.net well if you’re using Ubuntu, and you will know about open source software and Linux then you definitely know about Python programming language, well in-shot Python is a widely used general-purpose, high level programming language. Mostly used to write scripting and automation. It is a very popular language known for its simplicity and easy syntax (about my personal thought Python is the worlds best programming language), Actually Python was created in the late 1980s and It was first released by Guido van Rossum in 1991 and further developed by the Python Software Foundation as their successor to ABC Programming Language .

woah woah i thought it’s enough to know about python at beginning well lets go straight-to-the-point, and today’s our point is How to install Python 3.9.1 in Ubuntu 20.04 LTS (By default Ubuntu preloaded with python 3.8) so lets go I’m going to start with following simple steps just follow and boom.

Step 1 — Setting Up & Installation Python 3.9

Ubuntu 20.04 By default ship with Python 3 pre-installed. To make sure that our versions are up-to-date, let’s update and upgrade the system with the apt command;

$ sudo apt update && sudo apt upgrade

After Process complete next command is,

$ python3 -V

Output;

$ python3 -V
Python 3.8.3

So We have older version of python, and we all want to install and upgrade old version into newer one so Next Before adding the PPA its good to install software-properties-common package to easily manage distribution and independent software vendor software sources.

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa

Now install python 3.9 or Newer version using apt command:

$ sudo apt-get install python3.9

Step 2 – Install Python 3.9.3 on Ubuntu 20.04 from Source;

  • Now, download the Python 3.9.1 source code from official download site. Switch to a relevant directory and use wget to download source file.
$ cd /opt 
$ sudo wget https://www.python.org/ftp/python/3.9.3/Python-3.9.3.tgz
  • Next, extract the downloaded archive file and prepare the source for the installation.
$ tar xzf Python-3.9.3.tgz 
$ cd Python-3.9.3
$ sudo ./configure --enable-optimizations
  • Python source is ready to install. Execute make altinstall command to install Python 3.9 on your system.
$ sudo make altinstall
  • The Python 3.9.3 has been installed on Ubuntu 20.04 LTS. Verify the installed version:
$ python3 -V 
Python 3.9.3

Conclusion

In this Article Howtos tutorial, you have learned How to install Python 3.9 & 3.9.3 on Ubuntu 20.04 using Apt and source code. You can try Python examples via command line. using python wiki


Leave a Reply

Your email address will not be published. Required fields are marked *