Python is an object-oriented, high-level programming language. It is an open source with a large community. Python is used as key languages among the top tech companies like Google.
The latest stable version Python 3.9 is out with several improvements and security updates. It included multiple new modules, improved existing modules and many other features.
This tutorial will help you to install Python 3.9 on Ubuntu 18.04 LTS system. You will find two methods to install Python. First method will use deadsnakes PPA to install Python. The second method will use Python’s source code for the installation.
Follow the below tutorial and choose one method to install Python 3.9. Both the methods are tested with latest Ubuntu 18.04 system.
Before beginning the Python installation, install some required packages on your system. Login to your Ubuntu system and execute following commands:
sudo apt updatesudo apt install software-properties-common
The Apt package manager provides simple way for installing Python 3.9 on Ubuntu system. Follow the steps below:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt updatesudo apt install python3.9
python3.9 -V
Python 3.9.0
That’s it. Python 3.9 is installed on your Ubuntu system and ready to use.
As the Debian packages are available, We don’t recommend to install Python 3.9 packages from source code. But in some cases you may need to install Python from source code.
So follow the below instructions to install Python 3.9 using source code on Ubuntu 18.04 Linux system.
sudo apt install wget build-essential checkinstallsudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
cd /optsudo wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
tar xzf Python-3.9.0.tgzcd Python-3.9.0sudo ./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.0
sudo rm -f /opt/Python-3.9.0.tgz
In this tutorial, you have learned to install Python 3.9 on Ubuntu 18.04 using Apt and source code.
The post How To Install Python 3.9 on Ubuntu 18.04 appeared first on TecAdmin.
Lo and behold 👐, Ubuntu MATE 26.10 (Stonking Stingray) is here! 🎊 We are back…
This article provides a guide demonstrating how to deploy Kiwix Server on Ubuntu VPS. What…
A few months ago, we introduced Myna, our project to bring private, local speech-to-text dictation…
Ubuntu 26.10 “Stonking Stingray” arrives at a time when AI tools are accelerating vulnerability discovery.…
One of the best things about Rust is how easy it is to get started.…