Python 13 Installation in Linux
Step 1: Updating and Upgrading Operating System
Before Installing Python 3.12 with APT in Linux(Ubuntu) we have to Update Operating System. To update the operating system use the command mentioned below.
sudo apt update
To Upgrade the operating system use the command mentioned below.
sudo apt upgrade
Step 2: Adding the deadsnakes PPA to your system’s package sources
Deadsnakes PPA is a popular and trusted repository maintained by the Ubuntu community. It offers the latest versions of Python, including development and unstable releases, which may not be available in the official Ubuntu repositories.The purpose of using the deadsnakes PPA is to gain access to the most recent Python versions, as the official Ubuntu repositories often lag behind in providing the latest releases. By adding the deadsnakes PPA to your system’s package sources, you can install the latest Python versions directly from this repository.
Install the prerequisite for adding PPAs:
This command installs the software-properties-common
package, which provides a tool called add-apt-repository
. This tool is used to add new package repositories (like the deadsnakes PPA) to your system’s sources list.
sudo apt install software-properties-common -y
Adding deadsnakes PPA:
This command adds the deadsnakes PPA to your system’s package sources list. The ppa:deadsnakes/ppa
part specifies the PPA location, which is hosted on Launchpad (a software collaboration platform used by Ubuntu and other distributions).
sudo add-apt-repository ppa:deadsnakes/ppa
We have to update apt after we have installed repository.
Sudo apt update
Step 3: Installing Python3.13 in Linux
Now we can install python3.13 using command mentioned below.
sudo apt install python3.13
Step 4: Verifying the Installation of python3.13 in Linux
To verify the installation of python3.13 in linux we can simply display the version of python3.13 by using the command mentioned below.
python3.13 --version
Step 5: Installing PIP
If you have used apt to install python3.13 then you might have to install pip3.13 version manually , to do so command is mentioned below.
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.13
Step 6: Verifying Installation of PIP3.13
To verify the installation of pip3.13 in Linux we can use the command mentioned below.
How to install Python on Linux?
Before we start with how to install Python3 on Linux, let’s first go through the basic introduction to Python. Python is a widely used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrate systems more efficiently. There are two major Python versions- Python 2 and Python 3. Both are quite different.
Contact Us