{"id":13859,"date":"2025-04-04T09:14:27","date_gmt":"2025-04-04T09:14:27","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=13859"},"modified":"2025-04-04T09:14:30","modified_gmt":"2025-04-04T09:14:30","slug":"how-to-check-and-update-the-python-version-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/","title":{"rendered":"How to Check and Update the Python Version on Ubuntu 24.04"},"content":{"rendered":"\n<p><strong>Python <\/strong>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 <strong>check and update the Python version on Ubuntu 24.04<\/strong> 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.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<p><a href=\"#How-to-Check-and-Update-the-Python-Version-on-Ubuntu-24.04\">How to Check and Update the Python Version on Ubuntu 24.04<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#Method-1:-Check-the-Installed-Python-Version\">Method 1: Check the Installed Python Version<\/a><\/li>\n\n\n\n<li><a href=\"#Method-2:-Update-Python-Using-APT\">Method 2: Update Python Using APT<\/a><\/li>\n\n\n\n<li><a href=\"#Method-3:-Install-a-Specific-Python-Version-Using-DeadSnakes-PPA\">Method 3: Install a Specific Python Version Using DeadSnakes PPA<\/a><\/li>\n\n\n\n<li><a href=\"#Method-4:-Compile-Python-from-Source\">Method 4: Compile Python from Source<\/a><\/li>\n<\/ul>\n\n\n\n<p><a href=\"#Conclusion\">Conclusion<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Check-and-Update-the-Python-Version-on-Ubuntu-24.04\"><a id=\"post-13859-_heading=h.yqs4m2teunhs\"><\/a>How to Check and Update the Python Version on Ubuntu 24.04<\/h2>\n\n\n\n<p>To check and update Python on Ubuntu 24.04, use <strong>python3 &#8211;version <\/strong>to check the current version, and update via <strong>sudo apt update &amp;&amp; sudo apt install python3<\/strong>. There are various reasons for checking and updating the Python version.<\/p>\n\n\n\n<p>Here are given below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Compatibility<\/strong>: Specific established applications and libraries have their requirements that depend on certain versions of Python to function properly.<\/li>\n\n\n\n<li><strong>Security<\/strong>: Protecting systems comes in many ways. Newer versions of Python are known to have critical security patches and other methods of protecting the system.<\/li>\n\n\n\n<li><strong>Performance<\/strong>: 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.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-1:-Check-the-Installed-Python-Version\"><a id=\"post-13859-_heading=h.uscz2nnodsgl\"><\/a>Method 1: Check the Installed Python Version<\/h2>\n\n\n\n<p>Before upgrading Python, understanding what is currently installed in the versioning system is important.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.yrtf3ovyrfrd\"><\/a>Step 1: Open the Terminal<\/h3>\n\n\n\n<p>To open the terminal, which is where all the commands will be executed, press CTRL along with ALT and T.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.wzddmaitjmp1\"><\/a>Step 2: Check Python 3 Version<\/h3>\n\n\n\n<p>This command fetches the versions of Python 3 installed, and what will be displayed is your installed version e.g. <strong>Python 3.12.3<\/strong>:<\/p>\n\n\n\n<p>python3 &#8211;version<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1221\" height=\"144\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-1.png\" alt=\"python3 --version\" class=\"wp-image-13860\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-1.png 1221w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-1-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-1-1024x121.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-1-768x91.png 768w\" sizes=\"(max-width: 1221px) 100vw, 1221px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command displays the installed Python 3 version (e.g., Python 3.12.3).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.8wwlzxrdhzm4\"><\/a>Step 3: Check Python 2 Version (if installed)<\/h3>\n\n\n\n<p>To check whether Python 2 is installed and to check its version (if it is installed) run:<\/p>\n\n\n\n<pre>python2 --version<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1231\" height=\"145\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-2.png\" alt=\"python2 --version\" class=\"wp-image-13861\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-2.png 1231w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-2-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-2-1024x121.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-2-768x90.png 768w\" sizes=\"(max-width: 1231px) 100vw, 1231px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Note: It is recommended to use Python 3 since Python 2 is no longer supported.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.xei8ivmqgnwl\"><\/a>Step 4: Check Default Python Version<\/h3>\n\n\n\n<p>In case you have both version 2 and version 3 installed, you can check the default version using:<\/p>\n\n\n\n<pre>python --version<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1235\" height=\"139\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-3.png\" alt=\"python --version\" class=\"wp-image-13862\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-3.png 1235w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-3-300x34.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-3-1024x115.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-3-768x86.png 768w\" sizes=\"(max-width: 1235px) 100vw, 1235px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This will show you which version is the default if the command python is executed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-2:-Update-Python-Using-APT\"><a id=\"post-13859-_heading=h.vt6aifvijerd\"><\/a>Method 2: Update Python Using APT<\/h2>\n\n\n\n<p>For Ubuntu users, the recommended and straightforward way of updating Python is by using the APT package manager. Let\u2019s explore it:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.oawut5ouc0tv\"><\/a>Step 1: Update the Package List<\/h3>\n\n\n\n<p>In this step, users need to refresh the repository:<\/p>\n\n\n\n<pre>sudo apt update<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1235\" height=\"374\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-4.png\" alt=\"sudo apt update\" class=\"wp-image-13863\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-4.png 1235w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-4-300x91.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-4-1024x310.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-4-768x233.png 768w\" sizes=\"(max-width: 1235px) 100vw, 1235px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The statement above makes sure that your system has the latest information regarding the available packages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.my2ptiyyfgbe\"><\/a>Step 2: Upgrade Installed Packages<\/h3>\n\n\n\n<p>Python will also be included in the upgraded packages, if a newer version is available in the repository, then it will be installed:<\/p>\n\n\n\n<pre>sudo apt upgrade<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1238\" height=\"553\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-5.png\" alt=\"sudo apt upgrade\" class=\"wp-image-13864\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-5.png 1238w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-5-300x134.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-5-1024x457.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-5-768x343.png 768w\" sizes=\"(max-width: 1238px) 100vw, 1238px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command will install updates for packages that have already been installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.7bn4a1651wv6\"><\/a>Step 3: Download The Latest Version Of Python<\/h3>\n\n\n\n<p>In case there is an available newer version of Python, use this command:<\/p>\n\n\n\n<pre>sudo apt install python3<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1222\" height=\"350\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-6.png\" alt=\"sudo apt install python3\" class=\"wp-image-13865\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-6.png 1222w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-6-300x86.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-6-1024x293.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-6-768x220.png 768w\" sizes=\"(max-width: 1222px) 100vw, 1222px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command will use the latest version available from the repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.kpsbo7hn5tps\"><\/a>Step 4: Verify the Update<\/h3>\n\n\n\n<p>Confirm the update by checking the current version of Python using:<\/p>\n\n\n\n<pre>python3 --version<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1221\" height=\"144\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-7.png\" alt=\"python3 --version\" class=\"wp-image-13866\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-7.png 1221w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-7-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-7-1024x121.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-7-768x91.png 768w\" sizes=\"(max-width: 1221px) 100vw, 1221px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This ensures the update has been done successfully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-3:-Install-a-Specific-Python-Version-Using-DeadSnakes-PPA\"><a id=\"post-13859-_heading=h.wtz8j5ek0btr\"><\/a>Method 3: Install a Specific Python Version Using DeadSnakes PPA<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.i7n6m44e3rlp\"><\/a>Step 1: Add the DeadSnakes PPA<\/h3>\n\n\n\n<p>Execute these commands to add the PPA:<\/p>\n\n\n\n<pre>sudo apt update<\/pre>\n<pre>sudo apt install software-properties-common<\/pre>\n<pre>sudo add-apt-repository ppa:deadsnakes\/ppa<\/pre>\n<pre>sudo apt update<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1241\" height=\"585\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-8.png\" alt=\"sudo apt update\" class=\"wp-image-13867\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-8.png 1241w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-8-300x141.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-8-1024x483.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-8-768x362.png 768w\" sizes=\"(max-width: 1241px) 100vw, 1241px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The DeadSnakes PPA contains a wide array of Python versions that are not available in the default repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.om900b31ff0h\"><\/a>Step 2: Installing the Required Python Version<\/h3>\n\n\n\n<p>For instance, if you wish to install Python 3.11:<\/p>\n\n\n\n<pre>sudo apt install python3.11<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1241\" height=\"516\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-9.png\" alt=\"sudo apt install python3.11\" class=\"wp-image-13868\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-9.png 1241w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-9-300x125.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-9-1024x426.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-9-768x319.png 768w\" sizes=\"(max-width: 1241px) 100vw, 1241px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Try replacing 3.11 with whichever version you require.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.sid3d3gx15fl\"><\/a>Step 3: Set the Default Python Version<\/h3>\n\n\n\n<p>In the case that you wish to use the new default version, then you have to pass the update-alternatives command to it:<\/p>\n\n\n\n<pre>sudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.11 1<\/pre>\n<pre>sudo update-alternatives --config python3<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1240\" height=\"570\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-10.png\" alt=\"sudo update-alternatives --config python3\" class=\"wp-image-13869\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-10.png 1240w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-10-300x138.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-10-1024x471.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-10-768x353.png 768w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This enables you to use multiple versions of Python which are already installed in your system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-4:-Compile-Python-from-Source\"><a id=\"post-13859-_heading=h.teo59c56alen\"><\/a>Method 4: Compile Python from Source<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.xm43l55evll\"><\/a>Step 1: Install Build Dependencies<\/h3>\n\n\n\n<p>Get the needed machine tools and libraries to compile the Python version you intend to use:<\/p>\n\n\n\n<pre>sudo apt update<\/pre>\n<pre>sudo apt install build-essential checkinstall<\/pre>\n<pre>sudo apt install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1240\" height=\"721\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-11.png\" alt=\"sudo apt install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev\" class=\"wp-image-13870\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-11.png 1240w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-11-300x174.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-11-1024x595.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-11-768x447.png 768w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The listed packages will be required to build Python from the source.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.136uq8yren5u\"><\/a>Step 2: Downloading the Source code of Python<\/h3>\n\n\n\n<p>You can get the Python version you want from the website. In our case, we need to download Python 3.12\u2019s files:<\/p>\n\n\n\n<pre>wget https:\/\/www.python.org\/ftp\/python\/3.12.0\/Python-3.12.0.tgz<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1242\" height=\"549\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-12.png\" alt=\"wget https:\/\/www.python.org\/ftp\/python\/3.12.0\/Python-3.12.0.tgz\" class=\"wp-image-13871\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-12.png 1242w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-12-300x133.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-12-1024x453.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-12-768x339.png 768w\" sizes=\"(max-width: 1242px) 100vw, 1242px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.bf5a9hkoexj9\"><\/a>Step 3: Compiling and Extracting Python<\/h3>\n\n\n\n<p>Now, let us extract the downloaded folder and at the same time compile Python:<\/p>\n\n\n\n<pre>tar -xvf Python-3.12.0.tgz<\/pre>\n<pre>cd Python-3.12.0<\/pre>\n<pre>.\/configure --enable-optimizations<\/pre>\n<pre>make<\/pre>\n<pre>sudo make install<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1240\" height=\"723\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-13.png\" alt=\"sudo make install\" class=\"wp-image-13872\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-13.png 1240w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-13-300x175.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-13-1024x597.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-13-768x448.png 768w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Using the <strong>&#8211;enable-optimizations<\/strong> flag will enhance the performance of Python.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-13859-_heading=h.lnpqn529a9ff\"><\/a>Step 4: Confirming the Installation<\/h3>\n\n\n\n<p>Ensure that the correct version of Python is installed:<\/p>\n\n\n\n<pre>python3 --version<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1229\" height=\"143\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-14.png\" alt=\"python3 --version\" class=\"wp-image-13873\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-14.png 1229w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-14-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-14-1024x119.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/word-image-13859-14-768x89.png 768w\" sizes=\"(max-width: 1229px) 100vw, 1229px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This proves that the added version is indeed successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-13859-_heading=h.z0a1mtuyabfd\"><\/a>Conclusion<\/h2>\n\n\n\n<p>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\u2019s development requirements.<\/p>\n\n\n\t\t\t\t\t\t\t<h3 style=\"margin-bottom:20px;display:block;width:100%;margin-top:10px\">Frequently Asked Questions <\/h3>\r\n\t\t\t\t\t\t<style>\r\n\t\t\t\t<style>\r\n#wpsm_accordion_13978 .wpsm_panel-heading{\r\n\tpadding:0px !important;\r\n}\r\n#wpsm_accordion_13978 .wpsm_panel-title {\r\n\tmargin:0px !important; \r\n\ttext-transform:none !important;\r\n\tline-height: 1 !important;\r\n}\r\n#wpsm_accordion_13978 .wpsm_panel-title a{\r\n\ttext-decoration:none;\r\n\toverflow:hidden;\r\n\tdisplay:block;\r\n\tpadding:0px;\r\n\tfont-size: 18px !important;\r\n\tfont-family: Open Sans !important;\r\n\tcolor:#000000 !important;\r\n\tborder-bottom:0px !important;\r\n}\r\n\r\n#wpsm_accordion_13978 .wpsm_panel-title a:focus {\r\noutline: 0px !important;\r\n}\r\n\r\n#wpsm_accordion_13978 .wpsm_panel-title a:hover, #wpsm_accordion_13978 .wpsm_panel-title a:focus {\r\n\tcolor:#000000 !important;\r\n}\r\n#wpsm_accordion_13978 .acc-a{\r\n\tcolor: #000000 !important;\r\n\tbackground-color:#e8e8e8 !important;\r\n\tborder-color: #ddd;\r\n}\r\n#wpsm_accordion_13978 .wpsm_panel-default > .wpsm_panel-heading{\r\n\tcolor: #000000 !important;\r\n\tbackground-color: #e8e8e8 !important;\r\n\tborder-color: #e8e8e8 !important;\r\n\tborder-top-left-radius: 0px;\r\n\tborder-top-right-radius: 0px;\r\n}\r\n#wpsm_accordion_13978 .wpsm_panel-default {\r\n\t\tborder:1px solid transparent !important;\r\n\t}\r\n#wpsm_accordion_13978 {\r\n\tmargin-bottom: 20px;\r\n\toverflow: hidden;\r\n\tfloat: none;\r\n\twidth: 100%;\r\n\tdisplay: block;\r\n}\r\n#wpsm_accordion_13978 .ac_title_class{\r\n\tdisplay: block;\r\n\tpadding-top: 12px;\r\n\tpadding-bottom: 12px;\r\n\tpadding-left: 15px;\r\n\tpadding-right: 15px;\r\n}\r\n#wpsm_accordion_13978  .wpsm_panel {\r\n\toverflow:hidden;\r\n\t-webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\tbox-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\t\tborder-radius: 4px;\r\n\t}\r\n#wpsm_accordion_13978  .wpsm_panel + .wpsm_panel {\r\n\t\tmargin-top: 5px;\r\n\t}\r\n#wpsm_accordion_13978  .wpsm_panel-body{\r\n\tbackground-color:#ffffff !important;\r\n\tcolor:#000000 !important;\r\n\tborder-top-color: #e8e8e8 !important;\r\n\tfont-size:16px !important;\r\n\tfont-family: Open Sans !important;\r\n\toverflow: hidden;\r\n\t\tborder: 2px solid #e8e8e8 !important;\r\n\t}\r\n\r\n#wpsm_accordion_13978 .ac_open_cl_icon{\r\n\tbackground-color:#e8e8e8 !important;\r\n\tcolor: #000000 !important;\r\n\tfloat:right !important;\r\n\tpadding-top: 12px !important;\r\n\tpadding-bottom: 12px !important;\r\n\tline-height: 1.0 !important;\r\n\tpadding-left: 15px !important;\r\n\tpadding-right: 15px !important;\r\n\tdisplay: inline-block !important;\r\n}\r\n\r\n\t\t\t\r\n\t\t\t<\/style>\t\r\n\t\t\t<\/style>\r\n\t\t\t<div class=\"wpsm_panel-group\" id=\"wpsm_accordion_13978\" >\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_13978 \" href=\"javascript:void(0)\" data-target=\"#ac_13978_collapse1\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow can I check the current Python version on Ubuntu 24.04?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_13978_collapse1\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tTo check the Python version, open a terminal and run the command <code>python3 --version<\/code> or <code>python --version.<\/code>\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_13978 \" href=\"javascript:void(0)\" data-target=\"#ac_13978_collapse2\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I update Python on Ubuntu 24.04?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_13978_collapse2\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tTo update Python, use sudo apt update followed by <code>sudo apt install python3<\/code> to install the latest Python 3 version available in the repositories.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_13978 \" href=\"javascript:void(0)\" data-target=\"#ac_13978_collapse3\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I make the new Python version the default on Ubuntu 24.04?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_13978_collapse3\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tYou can use the <code>update-alternatives<\/code> command: <code>sudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.x 1<\/code>.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_13978 \" href=\"javascript:void(0)\" data-target=\"#ac_13978_collapse4\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow can I check if Python is properly updated?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_13978_collapse4\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tAfter updating, run <code>python3 --version<\/code> to verify the version. Ensure it matches the one you installed.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\r\n<script type=\"text\/javascript\">\r\n\t\r\n\t\tfunction do_resize(){\r\n\r\n\t\t\tvar width=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).width();\r\n\t\t\tvar height=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).height();\r\n\r\n\t\t\tvar toggleSize = true;\r\n\t\t\tjQuery('iframe').animate({\r\n\t\t\t    width: toggleSize ? width : 640,\r\n\t\t\t    height: toggleSize ? height : 360\r\n\t\t\t  }, 250);\r\n\r\n\t\t\t  toggleSize = !toggleSize;\r\n\t\t}\r\n\t\t\r\n<\/script>\t\n\n\n\n<p><\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":13980,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[748,226,317,747,350],"class_list":["post-13859","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-check-python-version","tag-python","tag-ubuntu-24-04","tag-update-python","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Check and Update the Python Version on Ubuntu 24.04<\/title>\n<meta name=\"description\" content=\"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check and Update the Python Version on Ubuntu 24.04\" \/>\n<meta property=\"og:description\" content=\"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-04T09:14:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-04T09:14:30+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Check and Update the Python Version on Ubuntu 24.04\",\"datePublished\":\"2025-04-04T09:14:27+00:00\",\"dateModified\":\"2025-04-04T09:14:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\"},\"wordCount\":894,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg\",\"keywords\":[\"Check Python Version\",\"Python\",\"Ubuntu 24.04\",\"Update Python\",\"Web Development\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\",\"name\":\"How to Check and Update the Python Version on Ubuntu 24.04\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg\",\"datePublished\":\"2025-04-04T09:14:27+00:00\",\"dateModified\":\"2025-04-04T09:14:30+00:00\",\"description\":\"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg\",\"width\":1020,\"height\":600,\"caption\":\"CHECK AND UPDATE THE PYTHON VERSION ON UBUNTU\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check and Update the Python Version on Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check and Update the Python Version on Ubuntu 24.04","description":"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Check and Update the Python Version on Ubuntu 24.04","og_description":"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-04-04T09:14:27+00:00","article_modified_time":"2025-04-04T09:14:30+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Check and Update the Python Version on Ubuntu 24.04","datePublished":"2025-04-04T09:14:27+00:00","dateModified":"2025-04-04T09:14:30+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/"},"wordCount":894,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg","keywords":["Check Python Version","Python","Ubuntu 24.04","Update Python","Web Development"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/","url":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/","name":"How to Check and Update the Python Version on Ubuntu 24.04","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg","datePublished":"2025-04-04T09:14:27+00:00","dateModified":"2025-04-04T09:14:30+00:00","description":"This guide will help explain how to check and update the Python version on Ubuntu 24.04 LTS also known as Noble Numbat.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/04\/CHECK-AND-UPDATE-THE-PYTHON-VERSION-ON-UBUNTU.jpg","width":1020,"height":600,"caption":"CHECK AND UPDATE THE PYTHON VERSION ON UBUNTU"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-check-and-update-the-python-version-on-ubuntu-24-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Check and Update the Python Version on Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/13859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=13859"}],"version-history":[{"count":4,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/13859\/revisions"}],"predecessor-version":[{"id":13979,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/13859\/revisions\/13979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/13980"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=13859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=13859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=13859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}