{"id":7731,"date":"2024-02-06T08:00:16","date_gmt":"2024-02-06T08:00:16","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=7731"},"modified":"2024-02-06T08:00:17","modified_gmt":"2024-02-06T08:00:17","slug":"install-multiple-versions-of-python-centos-ubuntu-linux","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/","title":{"rendered":"Install multiple versions of Python on CentOS and Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en.jpg\" alt=\"setup python 3 and 2 on centos 7 8 almalinux ubuntu 18.04 20.04 22.04 debian redhat linux\" class=\"wp-image-7750\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><strong>Python <\/strong>is one of the most popular programming languages used today. Many Linux systems come with Python pre-installed, but often it&#8217;s an older version like Python 2.7. As Python has advanced over the years, new versions like Python 3.8, 3.7, etc have been released with significant new features and improvements.<\/p>\n\n\n\n<p>However, this can cause issues if you need a specific version of Python for your applications or scripts. For example, some applications may require Python 2.7 while others need Python 3.8.<\/p>\n\n\n\n<p>The solution is to install multiple Python versions side-by-side on your Linux system. This allows you to switch between different versions for compatibility with various software.<\/p>\n\n\n\n<p>In this comprehensive guide, we will cover the steps to install multiple Python versions on CentOS and Ubuntu Linux. The instructions work for any Python version including the latest 3.x and 2.x releases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>Before we get started, make sure your system is up to date with the latest packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"># CentOS\/RHEL\n$ sudo yum update\n\n# Ubuntu\/Debian \n$ sudo apt update\n$ sudo apt upgrade<\/code><\/pre>\n\n\n\n<p>Python versions 2.x and 3.x can co-exist peacefully on the same system. We just need to make sure they are installed into separate directories.<\/p>\n\n\n\n<p>The examples below will use Python 3.8 and 2.7, but you can substitute any versions you want.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-python-on-centos\">Installing Python on CentOS<\/h2>\n\n\n\n<p>Recent versions of CentOS and RHEL come with Python 2 installed by default. We will use the Software Collections (SCL) repository to install other Python versions as needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1---install-development-tools\">Step 1 &#8211; Install Development Tools<\/h3>\n\n\n\n<p>We need git and development tools to build Python from source:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum groupinstall \"Development Tools\"\n$ sudo yum install git<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2---install-python-3-using-scl\">Step 2 &#8211; Install Python 3 using SCL<\/h3>\n\n\n\n<p>First enable the SCL repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install centos-release-scl<\/code><\/pre>\n\n\n\n<p>Now install Python 3.8:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install rh-python38<\/code><\/pre>\n\n\n\n<p>This will install Python 3.8 into the \/opt\/rh\/rh-python38 directory.<\/p>\n\n\n\n<p>To use this Python version, we need to enable it with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ scl enable rh-python38 bash<\/code><\/pre>\n\n\n\n<p>Verify you now have Python 3.8:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python --version<\/code><\/pre>\n\n\n\n<p>Exit back to system Python 2.7 with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ exit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3---install-python-2-from-ius\">Step 3 &#8211; Install Python 2 from IUS<\/h3>\n\n\n\n<p>The IUS repository provides updated versions of Python 2.x for CentOS.<\/p>\n\n\n\n<p>Enable IUS with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install https:\/\/repo.ius.io\/ius-release-el7.rpm<\/code><\/pre>\n\n\n\n<p>Now install Python 2.7:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo yum install python27<\/code><\/pre>\n\n\n\n<p>Check your Python 2.7 version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python2.7 --version<\/code><\/pre>\n\n\n\n<p>We now have Python 3.8 and Python 2.7 installed on CentOS!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-python-on-ubuntu\">Installing Python on Ubuntu<\/h2>\n\n\n\n<p>Ubuntu comes with Python 3 installed by default. We will use the deadsnakes PPA to install other Python versions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1---install-development-tools-1\">Step 1 &#8211; Install Development Tools<\/h3>\n\n\n\n<p>We need build tools and other dependencies to compile Python:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt install build-essential libssl-dev libffi-dev python3-dev<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2---install-python-versions\">Step 2 &#8211; Install Python Versions<\/h3>\n\n\n\n<p>Add the deadsnakes PPA which provides multiple Python versions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo add-apt-repository ppa:deadsnakes\/ppa<\/code><\/pre>\n\n\n\n<p>Now install Python 3.8 and 2.7:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt install python3.8 python2.7<\/code><\/pre>\n\n\n\n<p>Verify you have multiple Python versions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python3.8 --version\n$ python2.7 --version <\/code><\/pre>\n\n\n\n<p>We now have Python 3.8 and 2.7 ready to use!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"using-virtual-environments\">Using Virtual Environments<\/h2>\n\n\n\n<p>It&#8217;s recommended to create virtual environments for your projects rather than use system Python. This keeps dependencies separated between applications.<\/p>\n\n\n\n<p>To create a Python 3 virtual environment:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python3.8 -m venv myprojectenv<\/code><\/pre>\n\n\n\n<p>Activate it with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ source myprojectenv\/bin\/activate<\/code><\/pre>\n\n\n\n<p>When finished, deactivate the environment:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ deactivate<\/code><\/pre>\n\n\n\n<p>Virtual environments can also be created for Python 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python2.7 -m virtualenv myprojectenv<\/code><\/pre>\n\n\n\n<p>This allows you to easily switch between Python versions per project, without affecting the whole system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-the-default-python-version\">Setting the Default Python Version<\/h2>\n\n\n\n<p>After installing multiple Python versions,&nbsp;<code>python<\/code>&nbsp;may still reference the system Python.<\/p>\n\n\n\n<p>To change the default for all users, adjust the symlinks:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo rm \/usr\/bin\/python\n$ sudo ln -s \/usr\/bin\/python3.8 \/usr\/bin\/python<\/code><\/pre>\n\n\n\n<p>Now&nbsp;<code>python<\/code>&nbsp;will run Python 3.8.<\/p>\n\n\n\n<p>To switch back to Python 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo rm \/usr\/bin\/python\n$ sudo ln -s \/usr\/bin\/python2.7 \/usr\/bin\/python<\/code><\/pre>\n\n\n\n<p>For a single user, symlinks can be adjusted in ~\/.local\/bin instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ rm ~\/.local\/bin\/python\n$ ln -s \/usr\/bin\/python3.8 ~\/.local\/bin\/python<\/code><\/pre>\n\n\n\n<p>This will override the system default just for that user.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>In this guide, we covered installing and managing multiple Python versions on CentOS and Ubuntu. Here&#8217;s a quick recap of the major points:<\/p>\n\n\n\n<ul>\n<li>Use SCL and IUS repositories on CentOS to install additional Python releases<\/li>\n\n\n\n<li>Add the deadsnakes PPA on Ubuntu for multiple Python versions<\/li>\n\n\n\n<li>Create virtual environments to isolate dependencies between Python projects<\/li>\n\n\n\n<li>Adjust symlinks to change the default&nbsp;<code>python<\/code>&nbsp;version globally or per user<\/li>\n<\/ul>\n\n\n\n<p>Now you have the power to use the right Python version for your different applications and scripts on Linux! The ability to install multiple versions side-by-side provides compatibility and flexibility.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is one of the most popular programming languages used today. Many Linux systems come with Python pre-installed, but often it&#8217;s an older version like Python 2.7. As Python has advanced over the years, new versions like Python 3.8, 3.7, etc have been released with significant new features and improvements. However, this can cause issues ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[188,69],"tags":[],"yoast_head":"\n<title>Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-06T08:00:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-06T08:00:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"Install multiple versions of Python on CentOS and Ubuntu\",\"datePublished\":\"2024-02-06T08:00:16+00:00\",\"dateModified\":\"2024-02-06T08:00:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\"},\"wordCount\":618,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"CMS &amp; Web development\",\"Linux system administration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\",\"name\":\"Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2024-02-06T08:00:16+00:00\",\"dateModified\":\"2024-02-06T08:00:17+00:00\",\"description\":\"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install multiple versions of Python on CentOS and Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1783029557\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1783029557\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations","description":"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.","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:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/","og_locale":"en_US","og_type":"article","og_title":"Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations","og_description":"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.","og_url":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2024-02-06T08:00:16+00:00","article_modified_time":"2024-02-06T08:00:17+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/02\/python_multi_en.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"Install multiple versions of Python on CentOS and Ubuntu","datePublished":"2024-02-06T08:00:16+00:00","dateModified":"2024-02-06T08:00:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/"},"wordCount":618,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["CMS &amp; Web development","Linux system administration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/","url":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/","name":"Install multiple versions of Python on CentOS and Ubuntu - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2024-02-06T08:00:16+00:00","dateModified":"2024-02-06T08:00:17+00:00","description":"Comprehensive guide to installing and managing multiple Python versions on CentOS and Ubuntu Linux. Instructions to install Python 2.7 and Python 3.8 side-by-side.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/install-multiple-versions-of-python-centos-ubuntu-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"Install multiple versions of Python on CentOS and Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1783029557","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1783029557","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7731"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=7731"}],"version-history":[{"count":7,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7731\/revisions"}],"predecessor-version":[{"id":7759,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7731\/revisions\/7759"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=7731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=7731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=7731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}