{"id":6230,"date":"2017-03-06T16:43:00","date_gmt":"2017-03-06T13:43:00","guid":{"rendered":"https:\/\/unihost.com\/help\/install_python_centos6\/"},"modified":"2025-12-28T22:27:21","modified_gmt":"2025-12-28T19:27:21","slug":"install_python_centos6","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/install_python_centos6\/","title":{"rendered":"How to install Python on CentOS 6"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif;\">By default, CentOS 6 comes with Python 2.6. This manual is only for those, who want a newer\u00a0version of the software.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif;\">You can check which version is currently installed by opening the terminal and executing the command\u00a0<\/span><span style=\"font-family: 'Ubuntu Mono', monospace;\">python &#8211;version.<\/span><\/p>\n<p><!--more--><\/p>\n<h2>How to install\u00a0Python on CentOS 6<\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif;\">Execution of each of these commands can take up to several minutes.<\/span><\/p>\n<ol>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Update all packages with<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">yum update<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Install zlib-devel module:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">yum install zlib-devel<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Install\u00a0openssl-devel module:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">yum install openssl-devel<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Check the compiler version:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">gcc \u2013v<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">If you need to, install the compiler:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">yum install gcc<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Download\u00a0Python from the official source:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">cd \/tmp\/\nwget https:\/\/www.python.org\/ftp\/python\/2.7.9\/Python-2.7.9.tgz<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Unpack it and go to the unpacked folder:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">tar xfp Python-2.7.9.tgz<\/span><\/pre>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">cd Python-2.7.9<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Check the dependencies and execute\u00a0makefile:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">.\/configure\ncat Makefile | grep prefix\n.\/configure -h | grep prefix<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Create the installation package:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">make<\/span><\/pre>\n<\/li>\n<li><span style=\"font-family: Ubuntu, sans-serif;\">Install it:<\/span>\n<pre><span style=\"font-family: 'Ubuntu Mono', monospace;\">make install<\/span><\/pre>\n<\/li>\n<\/ol>\n<p><span style=\"font-family: Ubuntu, sans-serif;\">After you are done, Python will be updated to the latest version.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, CentOS 6 comes with Python 2.6. This manual is only for those, who want a newer\u00a0version of the software. You can check which version is currently installed by opening the terminal and executing the command\u00a0python &#8211;version.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[457,458,459,460,461],"class_list":["post-6230","post","type-post","status-publish","format-standard","hentry","category-vps","tag-centos-2","tag-install-2","tag-python-2","tag-460","tag-461"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install Python on CentOS 6 - Unihost.FAQ<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/install_python_centos6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Python on CentOS 6 - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"By default, CentOS 6 comes with Python 2.6. This manual is only for those, who want a newer\u00a0version of the software. You can check which version is currently installed by opening the terminal and executing the command\u00a0python &#8211;version.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/install_python_centos6\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-06T13:43:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-28T19:27:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"How to install Python on CentOS 6\",\"datePublished\":\"2017-03-06T13:43:00+00:00\",\"dateModified\":\"2025-12-28T19:27:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/\"},\"wordCount\":121,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"keywords\":[\"CentOS\",\"install\",\"python\",\"\u043f\u0438\u0442\u043e\u043d\",\"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\"],\"articleSection\":[\"Virtual Private Server (VPS)\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/\",\"url\":\"https:\/\/unihost.com\/help\/install_python_centos6\/\",\"name\":\"How to install Python on CentOS 6 - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"datePublished\":\"2017-03-06T13:43:00+00:00\",\"dateModified\":\"2025-12-28T19:27:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/install_python_centos6\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/install_python_centos6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to install Python on CentOS 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Python on CentOS 6 - Unihost.FAQ","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:\/\/unihost.com\/help\/install_python_centos6\/","og_locale":"en_US","og_type":"article","og_title":"How to install Python on CentOS 6 - Unihost.FAQ","og_description":"By default, CentOS 6 comes with Python 2.6. This manual is only for those, who want a newer\u00a0version of the software. You can check which version is currently installed by opening the terminal and executing the command\u00a0python &#8211;version.","og_url":"https:\/\/unihost.com\/help\/install_python_centos6\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2017-03-06T13:43:00+00:00","article_modified_time":"2025-12-28T19:27:21+00:00","og_image":[{"width":250,"height":141,"url":"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png","type":"image\/png"}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/install_python_centos6\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/install_python_centos6\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"How to install Python on CentOS 6","datePublished":"2017-03-06T13:43:00+00:00","dateModified":"2025-12-28T19:27:21+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/install_python_centos6\/"},"wordCount":121,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"keywords":["CentOS","install","python","\u043f\u0438\u0442\u043e\u043d","\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430"],"articleSection":["Virtual Private Server (VPS)"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/install_python_centos6\/","url":"https:\/\/unihost.com\/help\/install_python_centos6\/","name":"How to install Python on CentOS 6 - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"datePublished":"2017-03-06T13:43:00+00:00","dateModified":"2025-12-28T19:27:21+00:00","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/install_python_centos6\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/install_python_centos6\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/install_python_centos6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"How to install Python on CentOS 6"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/6230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=6230"}],"version-history":[{"count":5,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/6230\/revisions"}],"predecessor-version":[{"id":19582,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/6230\/revisions\/19582"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=6230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=6230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=6230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}