SlideShare a Scribd company logo
1/9
April 4, 2025
How to Check and Update the Python Version on
Ubuntu 24.04
greenwebpage.com/community/how-to-check-and-update-the-python-version-on-ubuntu-24-04/
Tutorials
by Karim Buzdar
April 4, 2025
2/9
Python is one of the widely used and versatile computer programming languages, and
system users must have the right version installed as it relates to functionality, security,
and efficiency. This guide will help explain how to check and update the Python version
on Ubuntu 24.04 by employing any of the available methods. Whether you are an
enthusiast, a developer, or a sysadmin, this guide covers all the steps needed in depth to
support you.
Table of Contents
How to Check and Update the Python Version on Ubuntu 24.04
Conclusion
To check and update Python on Ubuntu 24.04, use python3 –version to check the
current version, and update via sudo apt update && sudo apt install python3. There
are various reasons for checking and updating the Python version.
Here are given below:
Compatibility: Specific established applications and libraries have their
requirements that depend on certain versions of Python to function properly.
Security: Protecting systems comes in many ways. Newer versions of Python are
known to have critical security patches and other methods of protecting the system.
Performance: With updated versions, there is most often an automatically provided
improvement in performance, enhancement in the everyday coding experience due
to the reaping of the bugs, new features, and improvements in the division of the
undertaken tasks.
Method 1: Check the Installed Python Version
3/9
Before upgrading Python, understanding what is currently installed in the versioning
system is important.
Step 1: Open the Terminal
To open the terminal, which is where all the commands will be executed, press CTRL
along with ALT and T.
Step 2: Check Python 3 Version
This command fetches the versions of Python 3 installed, and what will be displayed is
your installed version e.g. Python 3.12.3:
python3 –version
This command displays the installed Python 3 version (e.g., Python 3.12.3).
Step 3: Check Python 2 Version (if installed)
To check whether Python 2 is installed and to check its version (if it is installed) run:
python2 --version
Note: It is recommended to use Python 3 since Python 2 is no longer supported.
Step 4: Check Default Python Version
In case you have both version 2 and version 3 installed, you can check the default
version using:
python --version
This will show you which version is the default if the command python is executed.
Method 2: Update Python Using APT
4/9
For Ubuntu users, the recommended and straightforward way of updating Python is by
using the APT package manager. Let’s explore it:
Step 1: Update the Package List
In this step, users need to refresh the repository:
sudo apt update
The statement above makes sure that your system has the latest information regarding
the available packages.
Step 2: Upgrade Installed Packages
Python will also be included in the upgraded packages, if a newer version is available in
the repository, then it will be installed:
sudo apt upgrade
This command will install updates for packages that have already been installed.
Step 3: Download The Latest Version Of Python
In case there is an available newer version of Python, use this command:
5/9
sudo apt install python3
This command will use the latest version available from the repository.
Step 4: Verify the Update
Confirm the update by checking the current version of Python using:
python3 --version
This ensures the update has been done successfully.
Method 3: Install a Specific Python Version Using DeadSnakes
PPA
You can utilize the DeadSnakes PPA if the default Ubuntu repository does not have the
Python version that you need. There are several different versions of Python available
there.
Step 1: Add the DeadSnakes PPA
Execute these commands to add the PPA:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
6/9
The DeadSnakes PPA contains a wide array of Python versions that are not available in
the default repository.
Step 2: Installing the Required Python Version
For instance, if you wish to install Python 3.11:
sudo apt install python3.11
Try replacing 3.11 with whichever version you require.
Step 3: Set the Default Python Version
In the case that you wish to use the new default version, then you have to pass the
update-alternatives command to it:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
sudo update-alternatives --config python3
7/9
This enables you to use multiple versions of Python which are already installed in your
system.
Method 4: Compile Python from Source
If you wish to have the latest version of Python or would like a specific build, then you can
cross-compile it from the source.
Step 1: Install Build Dependencies
Get the needed machine tools and libraries to compile the Python version you intend to
use:
sudo apt update
sudo apt install build-essential checkinstall
sudo apt install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev
libc6-dev libbz2-dev
8/9
The listed packages will be required to build Python from the source.
Step 2: Downloading the Source code of Python
You can get the Python version you want from the website. In our case, we need to
download Python 3.12’s files:
wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
Step 3: Compiling and Extracting Python
Now, let us extract the downloaded folder and at the same time compile Python:
tar -xvf Python-3.12.0.tgz
cd Python-3.12.0
9/9
./configure --enable-optimizations
make
sudo make install
Using the –enable-optimizations flag will enhance the performance of Python.
Step 4: Confirming the Installation
Ensure that the correct version of Python is installed:
python3 --version
This proves that the added version is indeed successful.
Conclusion
Checking and updating the Python version on Ubuntu 24.04 is essential for ensuring
compatibility, security, and performance. Whether you use APT, the DeadSnakes PPA, or
compile from source, this guide provides detailed steps to help you keep your Python
environment up-to-date. With these methods, you can check your Python version and
effortlessly change it to fulfill your system’s development requirements.

More Related Content

Similar to How to Check and Update the Python Version on Ubuntu 2404.pdf (20)

How to Install Odoo 18 with Pycharm - Odoo 18 Slides
How to Install Odoo 18 with Pycharm - Odoo 18 SlidesHow to Install Odoo 18 with Pycharm - Odoo 18 Slides
How to Install Odoo 18 with Pycharm - Odoo 18 Slides
Celine George
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntu
Iker Coranti
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
Inexture Solutions
 
Introduction To Python.pdf
Introduction To Python.pdfIntroduction To Python.pdf
Introduction To Python.pdf
Arpana Awasthi
 
Installing Python on Mac
Installing Python on MacInstalling Python on Mac
Installing Python on Mac
Wei-Wen Hsu
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.x
Nader Karimi
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
William Hart
 
Virtual environment in python on windows / linux os
Virtual environment in python on windows / linux osVirtual environment in python on windows / linux os
Virtual environment in python on windows / linux os
deepalishinkar1
 
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Aaron Meurer
 
LIGGGHTS installation-guide
LIGGGHTS installation-guideLIGGGHTS installation-guide
LIGGGHTS installation-guide
Braj Bhushan Prasad
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
Justin Lin
 
Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...
xploreitcorp
 
Getting started with PHPUnit
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnit
Khyati Gala
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
Vijay Chaitanya
 
vvvvReadme
vvvvReadmevvvvReadme
vvvvReadme
Mitazaki Yan
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdf
AbhinavBawane
 
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptxPython Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
BautistaAljhonG
 
Create a PHP Library the right way
Create a PHP Library the right wayCreate a PHP Library the right way
Create a PHP Library the right way
Christian Varela
 
How to Install Python on Mac
How to Install Python on MacHow to Install Python on Mac
How to Install Python on Mac
Vinita Silaparasetty
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdf
Suyashsingh992747
 
How to Install Odoo 18 with Pycharm - Odoo 18 Slides
How to Install Odoo 18 with Pycharm - Odoo 18 SlidesHow to Install Odoo 18 with Pycharm - Odoo 18 Slides
How to Install Odoo 18 with Pycharm - Odoo 18 Slides
Celine George
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntu
Iker Coranti
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
Inexture Solutions
 
Introduction To Python.pdf
Introduction To Python.pdfIntroduction To Python.pdf
Introduction To Python.pdf
Arpana Awasthi
 
Installing Python on Mac
Installing Python on MacInstalling Python on Mac
Installing Python on Mac
Wei-Wen Hsu
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.x
Nader Karimi
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
William Hart
 
Virtual environment in python on windows / linux os
Virtual environment in python on windows / linux osVirtual environment in python on windows / linux os
Virtual environment in python on windows / linux os
deepalishinkar1
 
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Aaron Meurer
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
Justin Lin
 
Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...Elevate your programming expertise with Xplore IT Corp’s python training in C...
Elevate your programming expertise with Xplore IT Corp’s python training in C...
xploreitcorp
 
Getting started with PHPUnit
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnit
Khyati Gala
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdf
AbhinavBawane
 
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptxPython Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
BautistaAljhonG
 
Create a PHP Library the right way
Create a PHP Library the right wayCreate a PHP Library the right way
Create a PHP Library the right way
Christian Varela
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdf
Suyashsingh992747
 

More from Green Webpage (20)

How to Install Portainer Docker UI Web Interface on Debian 12.pdf
How to Install Portainer Docker UI Web Interface on Debian 12.pdfHow to Install Portainer Docker UI Web Interface on Debian 12.pdf
How to Install Portainer Docker UI Web Interface on Debian 12.pdf
Green Webpage
 
How to Install Java on Debian 12 Using Apt and Deb.pdf
How to Install Java on Debian 12 Using Apt and Deb.pdfHow to Install Java on Debian 12 Using Apt and Deb.pdf
How to Install Java on Debian 12 Using Apt and Deb.pdf
Green Webpage
 
How to Install iptable on Debian 12.docx
How to Install iptable on Debian 12.docxHow to Install iptable on Debian 12.docx
How to Install iptable on Debian 12.docx
Green Webpage
 
How to Install Proxmox on Debian 12_ .docx
How to Install Proxmox on Debian 12_ .docxHow to Install Proxmox on Debian 12_ .docx
How to Install Proxmox on Debian 12_ .docx
Green Webpage
 
How to Install MySQL on Debian 12 In Just 8 Steps.pdf
How to Install MySQL on Debian 12 In Just 8 Steps.pdfHow to Install MySQL on Debian 12 In Just 8 Steps.pdf
How to Install MySQL on Debian 12 In Just 8 Steps.pdf
Green Webpage
 
How to Install NFS Server and Client on Ubuntu 2404.pdf
How to Install NFS Server and Client on Ubuntu 2404.pdfHow to Install NFS Server and Client on Ubuntu 2404.pdf
How to Install NFS Server and Client on Ubuntu 2404.pdf
Green Webpage
 
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdfHow to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
Green Webpage
 
How to Install Docker on Debian 12 All Possible Methods.pdf
How to Install Docker on Debian 12 All Possible Methods.pdfHow to Install Docker on Debian 12 All Possible Methods.pdf
How to Install Docker on Debian 12 All Possible Methods.pdf
Green Webpage
 
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdfHow to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
Green Webpage
 
How to Install XFCE Desktop on Ubuntu 2404.pdf
How to Install XFCE Desktop on Ubuntu 2404.pdfHow to Install XFCE Desktop on Ubuntu 2404.pdf
How to Install XFCE Desktop on Ubuntu 2404.pdf
Green Webpage
 
How to Install MariaDB on Ubuntu 2404.pdf
How to Install MariaDB on Ubuntu 2404.pdfHow to Install MariaDB on Ubuntu 2404.pdf
How to Install MariaDB on Ubuntu 2404.pdf
Green Webpage
 
How to Add Comments to Iptable Rules 6 Examples.pdf
How to Add Comments to Iptable Rules 6 Examples.pdfHow to Add Comments to Iptable Rules 6 Examples.pdf
How to Add Comments to Iptable Rules 6 Examples.pdf
Green Webpage
 
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdfHow to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
Green Webpage
 
How to Install and Manage Podman on Ubuntu 2404.pdf
How to Install and Manage Podman on Ubuntu 2404.pdfHow to Install and Manage Podman on Ubuntu 2404.pdf
How to Install and Manage Podman on Ubuntu 2404.pdf
Green Webpage
 
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdfHow to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
Green Webpage
 
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdfHow to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
Green Webpage
 
How to Install and Use Docker Compose on Ubuntu 2404.pdf
How to Install and Use Docker Compose on Ubuntu 2404.pdfHow to Install and Use Docker Compose on Ubuntu 2404.pdf
How to Install and Use Docker Compose on Ubuntu 2404.pdf
Green Webpage
 
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdfHow to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
Green Webpage
 
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdfHow to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
Green Webpage
 
How to Rename File in Ubuntu 2404 Using GUI Terminal.pdf
How to Rename File in Ubuntu 2404 Using GUI  Terminal.pdfHow to Rename File in Ubuntu 2404 Using GUI  Terminal.pdf
How to Rename File in Ubuntu 2404 Using GUI Terminal.pdf
Green Webpage
 
How to Install Portainer Docker UI Web Interface on Debian 12.pdf
How to Install Portainer Docker UI Web Interface on Debian 12.pdfHow to Install Portainer Docker UI Web Interface on Debian 12.pdf
How to Install Portainer Docker UI Web Interface on Debian 12.pdf
Green Webpage
 
How to Install Java on Debian 12 Using Apt and Deb.pdf
How to Install Java on Debian 12 Using Apt and Deb.pdfHow to Install Java on Debian 12 Using Apt and Deb.pdf
How to Install Java on Debian 12 Using Apt and Deb.pdf
Green Webpage
 
How to Install iptable on Debian 12.docx
How to Install iptable on Debian 12.docxHow to Install iptable on Debian 12.docx
How to Install iptable on Debian 12.docx
Green Webpage
 
How to Install Proxmox on Debian 12_ .docx
How to Install Proxmox on Debian 12_ .docxHow to Install Proxmox on Debian 12_ .docx
How to Install Proxmox on Debian 12_ .docx
Green Webpage
 
How to Install MySQL on Debian 12 In Just 8 Steps.pdf
How to Install MySQL on Debian 12 In Just 8 Steps.pdfHow to Install MySQL on Debian 12 In Just 8 Steps.pdf
How to Install MySQL on Debian 12 In Just 8 Steps.pdf
Green Webpage
 
How to Install NFS Server and Client on Ubuntu 2404.pdf
How to Install NFS Server and Client on Ubuntu 2404.pdfHow to Install NFS Server and Client on Ubuntu 2404.pdf
How to Install NFS Server and Client on Ubuntu 2404.pdf
Green Webpage
 
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdfHow to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
Green Webpage
 
How to Install Docker on Debian 12 All Possible Methods.pdf
How to Install Docker on Debian 12 All Possible Methods.pdfHow to Install Docker on Debian 12 All Possible Methods.pdf
How to Install Docker on Debian 12 All Possible Methods.pdf
Green Webpage
 
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdfHow to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
How to Add Users to Sudoers on Debian 12 Complete Tutorial.pdf
Green Webpage
 
How to Install XFCE Desktop on Ubuntu 2404.pdf
How to Install XFCE Desktop on Ubuntu 2404.pdfHow to Install XFCE Desktop on Ubuntu 2404.pdf
How to Install XFCE Desktop on Ubuntu 2404.pdf
Green Webpage
 
How to Install MariaDB on Ubuntu 2404.pdf
How to Install MariaDB on Ubuntu 2404.pdfHow to Install MariaDB on Ubuntu 2404.pdf
How to Install MariaDB on Ubuntu 2404.pdf
Green Webpage
 
How to Add Comments to Iptable Rules 6 Examples.pdf
How to Add Comments to Iptable Rules 6 Examples.pdfHow to Add Comments to Iptable Rules 6 Examples.pdf
How to Add Comments to Iptable Rules 6 Examples.pdf
Green Webpage
 
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdfHow to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
How to Limit CPU Usage of a Process in Linux with CPULimit With Examples.pdf
Green Webpage
 
How to Install and Manage Podman on Ubuntu 2404.pdf
How to Install and Manage Podman on Ubuntu 2404.pdfHow to Install and Manage Podman on Ubuntu 2404.pdf
How to Install and Manage Podman on Ubuntu 2404.pdf
Green Webpage
 
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdfHow to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
How to Install Apache Cassandra on Ubuntu 2404 Top 3 Ways.pdf
Green Webpage
 
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdfHow to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
How to Set Up Nginx Server Blocks on Ubuntu 2404.pdf
Green Webpage
 
How to Install and Use Docker Compose on Ubuntu 2404.pdf
How to Install and Use Docker Compose on Ubuntu 2404.pdfHow to Install and Use Docker Compose on Ubuntu 2404.pdf
How to Install and Use Docker Compose on Ubuntu 2404.pdf
Green Webpage
 
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdfHow to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
How to Find Motherboard Model and Serial Number in Linux 3 Methods.pdf
Green Webpage
 
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdfHow to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
How to Install Eclipse IDE on Ubuntu 2404 3 Quick Methods.pdf
Green Webpage
 
How to Rename File in Ubuntu 2404 Using GUI Terminal.pdf
How to Rename File in Ubuntu 2404 Using GUI  Terminal.pdfHow to Rename File in Ubuntu 2404 Using GUI  Terminal.pdf
How to Rename File in Ubuntu 2404 Using GUI Terminal.pdf
Green Webpage
 
Ad

Recently uploaded (20)

ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
Compliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf textCompliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf text
Earthling security
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Scott M. Graffius
 
Trends Report: Artificial Intelligence (AI)
Trends Report: Artificial Intelligence (AI)Trends Report: Artificial Intelligence (AI)
Trends Report: Artificial Intelligence (AI)
Brian Ahier
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdfTop 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
SOFTTECHHUB
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
Compliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf textCompliance-as-a-Service document pdf text
Compliance-as-a-Service document pdf text
Earthling security
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Mark Zuckerberg teams up with frenemy Palmer Luckey to shape the future of XR...
Scott M. Graffius
 
Trends Report: Artificial Intelligence (AI)
Trends Report: Artificial Intelligence (AI)Trends Report: Artificial Intelligence (AI)
Trends Report: Artificial Intelligence (AI)
Brian Ahier
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdfTop 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
Top 25 AI Coding Agents for Vibe Coders to Use in 2025.pdf
SOFTTECHHUB
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
Ad

How to Check and Update the Python Version on Ubuntu 2404.pdf

  • 1. 1/9 April 4, 2025 How to Check and Update the Python Version on Ubuntu 24.04 greenwebpage.com/community/how-to-check-and-update-the-python-version-on-ubuntu-24-04/ Tutorials by Karim Buzdar April 4, 2025
  • 2. 2/9 Python is one of the widely used and versatile computer programming languages, and system users must have the right version installed as it relates to functionality, security, and efficiency. This guide will help explain how to check and update the Python version on Ubuntu 24.04 by employing any of the available methods. Whether you are an enthusiast, a developer, or a sysadmin, this guide covers all the steps needed in depth to support you. Table of Contents How to Check and Update the Python Version on Ubuntu 24.04 Conclusion To check and update Python on Ubuntu 24.04, use python3 –version to check the current version, and update via sudo apt update && sudo apt install python3. There are various reasons for checking and updating the Python version. Here are given below: Compatibility: Specific established applications and libraries have their requirements that depend on certain versions of Python to function properly. Security: Protecting systems comes in many ways. Newer versions of Python are known to have critical security patches and other methods of protecting the system. Performance: With updated versions, there is most often an automatically provided improvement in performance, enhancement in the everyday coding experience due to the reaping of the bugs, new features, and improvements in the division of the undertaken tasks. Method 1: Check the Installed Python Version
  • 3. 3/9 Before upgrading Python, understanding what is currently installed in the versioning system is important. Step 1: Open the Terminal To open the terminal, which is where all the commands will be executed, press CTRL along with ALT and T. Step 2: Check Python 3 Version This command fetches the versions of Python 3 installed, and what will be displayed is your installed version e.g. Python 3.12.3: python3 –version This command displays the installed Python 3 version (e.g., Python 3.12.3). Step 3: Check Python 2 Version (if installed) To check whether Python 2 is installed and to check its version (if it is installed) run: python2 --version Note: It is recommended to use Python 3 since Python 2 is no longer supported. Step 4: Check Default Python Version In case you have both version 2 and version 3 installed, you can check the default version using: python --version This will show you which version is the default if the command python is executed. Method 2: Update Python Using APT
  • 4. 4/9 For Ubuntu users, the recommended and straightforward way of updating Python is by using the APT package manager. Let’s explore it: Step 1: Update the Package List In this step, users need to refresh the repository: sudo apt update The statement above makes sure that your system has the latest information regarding the available packages. Step 2: Upgrade Installed Packages Python will also be included in the upgraded packages, if a newer version is available in the repository, then it will be installed: sudo apt upgrade This command will install updates for packages that have already been installed. Step 3: Download The Latest Version Of Python In case there is an available newer version of Python, use this command:
  • 5. 5/9 sudo apt install python3 This command will use the latest version available from the repository. Step 4: Verify the Update Confirm the update by checking the current version of Python using: python3 --version This ensures the update has been done successfully. Method 3: Install a Specific Python Version Using DeadSnakes PPA You can utilize the DeadSnakes PPA if the default Ubuntu repository does not have the Python version that you need. There are several different versions of Python available there. Step 1: Add the DeadSnakes PPA Execute these commands to add the PPA: sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update
  • 6. 6/9 The DeadSnakes PPA contains a wide array of Python versions that are not available in the default repository. Step 2: Installing the Required Python Version For instance, if you wish to install Python 3.11: sudo apt install python3.11 Try replacing 3.11 with whichever version you require. Step 3: Set the Default Python Version In the case that you wish to use the new default version, then you have to pass the update-alternatives command to it: sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 sudo update-alternatives --config python3
  • 7. 7/9 This enables you to use multiple versions of Python which are already installed in your system. Method 4: Compile Python from Source If you wish to have the latest version of Python or would like a specific build, then you can cross-compile it from the source. Step 1: Install Build Dependencies Get the needed machine tools and libraries to compile the Python version you intend to use: sudo apt update sudo apt install build-essential checkinstall sudo apt install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
  • 8. 8/9 The listed packages will be required to build Python from the source. Step 2: Downloading the Source code of Python You can get the Python version you want from the website. In our case, we need to download Python 3.12’s files: wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz Step 3: Compiling and Extracting Python Now, let us extract the downloaded folder and at the same time compile Python: tar -xvf Python-3.12.0.tgz cd Python-3.12.0
  • 9. 9/9 ./configure --enable-optimizations make sudo make install Using the –enable-optimizations flag will enhance the performance of Python. Step 4: Confirming the Installation Ensure that the correct version of Python is installed: python3 --version This proves that the added version is indeed successful. Conclusion Checking and updating the Python version on Ubuntu 24.04 is essential for ensuring compatibility, security, and performance. Whether you use APT, the DeadSnakes PPA, or compile from source, this guide provides detailed steps to help you keep your Python environment up-to-date. With these methods, you can check your Python version and effortlessly change it to fulfill your system’s development requirements.