Python is an object-oriented, high-level programming language. It is open-source with a large community. Python is used as a key language among the top tech companies like Google.
The Python 3.9 stable version has been released with several improvements and security updates. It included multiple new modules, improved existing modules, and many other features.
You can choose deadsnakes PPA for Python installation on Ubuntu 20.04 system.
Use this tutorial to install Python 3.9 On Ubuntu 20.04 LTS Linux system via Apt-Get. You can also choose the second method to install Python using source code.
Login to your Ubuntu system and open a terminal, then install some required packages.
sudo apt update
sudo apt install wget software-properties-common
Use the Ubuntu package manager Apt to install Python 3.9 on Ubuntu Linux system. Follow the below steps:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
python3.9 -V
Python 3.9.6
That’s it, You have successfully installed Python 3.9 on your Ubuntu 20.04 LTS system.
You also have one more option to install Python 3.9 using source code. We don’t recommend installing Python 3.9 packages from source code. But in some cases, you may need to install Python from the source code.
So follow the below instructions to install Python 3.9 using source code on Ubuntu 20.04 Linux system.
sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
cd /opt
sudo wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz
tar xzf Python-3.9.6.tgz
cd Python-3.9.6
sudo ./configure --enable-optimizations
sudo make altinstall
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.
python3.9 -V
Python 3.9.6
sudo rm -f /opt/Python-3.9.6.tgz
In this tutorial, you have learned to install Python 3.9 on Ubuntu 20.04 using Apt and source code. You can try Python examples via command line.
The post How To Install Python 3.9 on Ubuntu 20.04 appeared first on TecAdmin.
Canonical is proud to announce it has achieved compliance with IEC 62443-4-1 for cybersecurity in…
Oracle VirtualBox, announced the first maintenance update for the 7.2 release series few days ago.…
Firefox 143.0, the new monthly release of the popular free open-source web browser, is available…
VLC, the popular free open-source media player, rolled out the new 3.0.22 version few days…
Dash to Panel, the popular Gnome Shell extension, updated few days ago with support for…
Welcome to the Ubuntu Weekly Newsletter, Issue 909 for the week of September 7 –…