{"id":3888,"date":"2023-10-04T13:53:47","date_gmt":"2023-10-04T08:23:47","guid":{"rendered":"https:\/\/www.itsupportwale.com\/blog\/?p=3888"},"modified":"2026-02-07T14:34:05","modified_gmt":"2026-02-07T09:04:05","slug":"how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts","status":"publish","type":"post","link":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/","title":{"rendered":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS"},"content":{"rendered":"\n<p>In this article, we will upgrade to&nbsp;<strong>Python 3.12<\/strong>&nbsp;and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.<\/p>\n\n\n\n<p>The current stable version of Python\u00a0was\u00a0<a title=\"\" href=\"https:\/\/www.python.org\/downloads\/release\/python-3120\/\" target=\"_blank\" rel=\"noopener\">released<\/a>\u00a0on 02 October 2023. Many Ubuntu users are facing problems when upgrading Python to the latest version. Python 3.10 is available as default when we install Ubuntu 22.04 LTS and Python 3.9 is available in Ubuntu 20.04. Python 3.12.0 is not available in the default Ubuntu 20.04 and 22.04 repositories.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Also Read:&nbsp;How to upgrade to Python 3.11 on Ubuntu 20.04 and 22.04 LTS<\/li>\n<\/ul>\n\n\n\n<p>So let\u2019s start by checking your system&#8217;s currently installed version of Python.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -V<\/code><\/pre>\n\n\n\n<p>As seen in the image above, my currently installed Python version is 3.10 but yours may differ.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d8f94a24366\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d8f94a24366\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Install_Python_312\" >Install Python 3.12<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Step_1_Add_the_repository_and_update\" >Step 1: Add the repository and update<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Step_2_Install_the_Python_312_package_using_apt-get\" >Step 2: Install the Python 3.12 package using apt-get<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Step_3_Add_Python_311_Python_312_to_update-alternatives\" >Step 3: Add Python 3.11 &amp; Python 3.12 to update-alternatives<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Step_4_Update_Python_3_for_point_to_Python_312\" >Step 4: Update Python 3 for point to Python 3.12<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#Step_5_Test_the_version_of_python\" >Step 5: Test the version of python<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_Python_312\"><\/span>Install Python 3.12<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Follow the simple steps to install and configure&nbsp;<strong>Python 3.12<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Add_the_repository_and_update\"><\/span>Step 1: Add the repository and update<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The latest Python 3.12 is not available in Ubuntu\u2019s default repositories. So, we have to add an additional repository. On launchpad repository named&nbsp;<a href=\"https:\/\/launchpad.net\/~deadsnakes\/+archive\/ubuntu\/ppa\" target=\"_blank\" rel=\"noreferrer noopener\">deadsnakes<\/a>&nbsp;is available for Python Packages.<\/p>\n\n\n\n<p>Add the&nbsp;<strong>deadsnakes<\/strong>&nbsp;repository using the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository ppa:deadsnakes\/ppa\nsudo apt-get update<\/code><\/pre>\n\n\n\n<p>Update the package list using the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update<\/code><\/pre>\n\n\n\n<p>Verify the updated Python packages list using this command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt list | grep python3.12<\/code><\/pre>\n\n\n\n<p>As seen in the image above, Now we have Python 3.12 available for installation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Install_the_Python_312_package_using_apt-get\"><\/span>Step 2: Install the Python 3.12 package using apt-get<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>install Python 3.12 by using the below command :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install python3.12<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Add_Python_311_Python_312_to_update-alternatives\"><\/span>Step 3: Add Python 3.11 &amp; Python 3.12 to update-alternatives<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add both old and new versions of Python to Update Alternatives.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.11 1\nsudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.12 2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Update_Python_3_for_point_to_Python_312\"><\/span>Step 4: Update Python 3 for point to Python 3.12<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>By default, Python 3 is pointed to Python 3.11. That means when we run&nbsp;<strong>python3<\/strong>&nbsp;it will execute as&nbsp;<strong>python 3.11<\/strong>&nbsp;but we want to execute this as&nbsp;<strong>python 3.12<\/strong>.<\/p>\n\n\n\n<p>Type this command to configure&nbsp;<strong>python3<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo update-alternatives --config python3<\/code><\/pre>\n\n\n\n<p>You should get the above output. Now type&nbsp;<strong>2<\/strong>&nbsp;and hit enter for&nbsp;<strong>Python 3.12<\/strong> Remember the selected number may differ so choose the selection number which is for&nbsp;<strong>Python 3.12<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Test_the_version_of_python\"><\/span>Step 5: Test the version of python<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Finally, test the current version of Python by typing this :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -V<\/code><\/pre>\n\n\n\n<p>You should get&nbsp;<strong>Python 3.12<\/strong> as an output.<\/p>\n\n\n\n<p>In this article, we learn how to upgrade Python to the latest version which is 3.12 in Ubuntu 20.04 and 22.04 LTS.<\/p>\n\n\n\n<p>Share your thoughts in the comment section. Happy Learning \u2026!!<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Also Read:&nbsp;<a href=\"https:\/\/oracle.itsupportwale.com\/blog\/how-to-install-asterisk-16-on-ubuntu-18-04-lts\/?swcfpc=1\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Asterisk 16 on Ubuntu 18.04 LTS<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will upgrade to&nbsp;Python 3.12&nbsp;and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS. The current stable version of Python\u00a0was\u00a0released\u00a0on 02 October 2023. Many Ubuntu users are facing problems when upgrading Python to the latest version. Python 3.10 is available as default when we install Ubuntu 22.04 &#8230; <a title=\"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS\" class=\"read-more\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\" aria-label=\"Read more  on How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":3894,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[411],"tags":[79,601,653,76,638,639,73,415,72,654],"class_list":["post-3888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-how-to-install-python-in-ubuntu","tag-how-to-install-python-in-ubuntu-20-04","tag-python-3-12","tag-python-in-ubuntu-18","tag-python-in-ubuntu-20-04","tag-python-in-ubuntu-22-04","tag-python-in-ubutnu","tag-upgrade-python","tag-upgrade-python-in-ubuntu","tag-upgrade-to-python-3-12"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale<\/title>\n<meta name=\"description\" content=\"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale\" \/>\n<meta property=\"og:description\" content=\"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\" \/>\n<meta property=\"og:site_name\" content=\"ITSupportWale\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-04T08:23:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-07T09:04:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Techie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Techie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\"},\"author\":{\"name\":\"Techie\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\"},\"headline\":\"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS\",\"datePublished\":\"2023-10-04T08:23:47+00:00\",\"dateModified\":\"2026-02-07T09:04:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\"},\"wordCount\":383,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg\",\"keywords\":[\"how to install python in ubuntu\",\"how to install python in ubuntu 20.04\",\"python 3.12\",\"python in ubuntu 18\",\"python in ubuntu 20.04\",\"python in ubuntu 22.04\",\"python in ubutnu\",\"upgrade python\",\"upgrade python in ubuntu\",\"upgrade to python 3.12\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\",\"name\":\"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg\",\"datePublished\":\"2023-10-04T08:23:47+00:00\",\"dateModified\":\"2026-02-07T09:04:05+00:00\",\"description\":\"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.\",\"breadcrumb\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg\",\"width\":1024,\"height\":683,\"caption\":\"upgrade to python 3.12\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itsupportwale.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"name\":\"ITSupportWale\",\"description\":\"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides\",\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\",\"name\":\"itsupportwale\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"width\":1119,\"height\":144,\"caption\":\"itsupportwale\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\",\"name\":\"Techie\",\"sameAs\":[\"https:\/\/itsupportwale.com\",\"iswblogadmin\"],\"url\":\"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale","description":"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.","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:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/","og_locale":"en_US","og_type":"article","og_title":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale","og_description":"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.","og_url":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/","og_site_name":"ITSupportWale","article_publisher":"https:\/\/www.facebook.com\/Itsupportwale-298547177495978","article_published_time":"2023-10-04T08:23:47+00:00","article_modified_time":"2026-02-07T09:04:05+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg","type":"image\/jpeg"}],"author":"Techie","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Techie","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#article","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/"},"author":{"name":"Techie","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d"},"headline":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS","datePublished":"2023-10-04T08:23:47+00:00","dateModified":"2026-02-07T09:04:05+00:00","mainEntityOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/"},"wordCount":383,"commentCount":4,"publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg","keywords":["how to install python in ubuntu","how to install python in ubuntu 20.04","python 3.12","python in ubuntu 18","python in ubuntu 20.04","python in ubuntu 22.04","python in ubutnu","upgrade python","upgrade python in ubuntu","upgrade to python 3.12"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/","url":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/","name":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS - ITSupportWale","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg","datePublished":"2023-10-04T08:23:47+00:00","dateModified":"2026-02-07T09:04:05+00:00","description":"we will upgrade to\u00a0Python 3.12\u00a0and configure it as the default version of Python in Ubuntu 20.04 and 22.04 LTS.","breadcrumb":{"@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#primaryimage","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/10\/upgrade-to-python-3.12.jpg","width":1024,"height":683,"caption":"upgrade to python 3.12"},{"@type":"BreadcrumbList","@id":"https:\/\/itsupportwale.com\/blog\/how-to-upgrade-to-python-3-12-on-ubuntu-20-04-and-22-04-lts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsupportwale.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to upgrade to Python 3.12 on Ubuntu 20.04 and 22.04 LTS"}]},{"@type":"WebSite","@id":"https:\/\/itsupportwale.com\/blog\/#website","url":"https:\/\/itsupportwale.com\/blog\/","name":"ITSupportWale","description":"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides","publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itsupportwale.com\/blog\/#organization","name":"itsupportwale","url":"https:\/\/itsupportwale.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","width":1119,"height":144,"caption":"itsupportwale"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Itsupportwale-298547177495978"]},{"@type":"Person","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d","name":"Techie","sameAs":["https:\/\/itsupportwale.com","iswblogadmin"],"url":"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/3888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/comments?post=3888"}],"version-history":[{"count":2,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/3888\/revisions"}],"predecessor-version":[{"id":4493,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/3888\/revisions\/4493"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media\/3894"}],"wp:attachment":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media?parent=3888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/categories?post=3888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/tags?post=3888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}