{"id":1100,"date":"2018-07-27T11:42:47","date_gmt":"2018-07-27T06:12:47","guid":{"rendered":"https:\/\/www.coimbatorewebhosting.com\/blog\/?p=1100"},"modified":"2019-04-01T13:23:33","modified_gmt":"2019-04-01T07:53:33","slug":"install-latest-python-version3-6","status":"publish","type":"post","link":"https:\/\/coimbatorewebhosting.com\/blog\/install-latest-python-version3-6\/","title":{"rendered":"How to Install Latest Python 3.6 Version in Linux centos 7"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><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><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/install-latest-python-version3-6\/#Introduction\" >Introduction:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/install-latest-python-version3-6\/#Install_Python_36_in_Linux\" >Install Python 3.6 in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/install-latest-python-version3-6\/#Install_Python_IDLE_in_Linux\" >Install Python IDLE in Linux<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/install-latest-python-version3-6\/#Summary\" >Summary<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Latest Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms<\/p>\n<p>When you write programs in Python, you never need to bother about the low-level details such as managing the memory used by your program, etc.<\/p>\n<p>In this article we will show how to install and use Python 3.x in CentOS\/RHEL 7, Debian and its derivatives such as Ubuntu (latest LTS version already has latest Python installed) or Linux Mint. Our focus will be installing the core <a  href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/need-of-dedicated-ip-address\/\" title=\"language tools\" alt=\"language tools\">language tools<\/a> that can be used in the command line.<\/p>\n<p>However, we will also explain how to install the\u00a0<a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"nofollow noopener\" target=\"_blank\">Python IDLE\u00a0<\/a>\u2013 a GUI-based tool that allows us to run Python code and create standalone functions.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Install_Python_36_in_Linux\"><\/span>Install Python 3.6 in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>At the time of this writing (October 2017), the latest\u00a0<strong>Python 3.x<\/strong>\u00a0versions available in\u00a0<strong>CentOS\/RHEL 7<\/strong>\u00a0and\u00a0<strong>Debian 8\/9<\/strong>\u00a0are\u00a0<strong>3.4<\/strong>\u00a0and\u00a0<strong>3.5<\/strong>\u00a0respectively.<\/p>\n<p>Although we can install the core packages and their dependencies using\u00a0yum\u00a0and\u00a0aptitude\u00a0(or\u00a0apt-get), we will explain how to perform the installation from source instead.<\/p>\n<p>Why? The reason is simple: this allows us to have the latest stable release of the language (<strong>3.6<\/strong>) and to provide a distribution-agnostic installation method.<\/p>\n<p>Prior to installing Python in CentOS 7, let\u2019s make sure our system has all the <a href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/how-to-change-mail-mx-records-to-google-mail-records-in-plesk-panel\/\" title=\"necessary development\" alt=\"necessary development\">necessary development<\/a> dependencies:<\/p>\n<pre># yum -y groupinstall development\r\n# yum -y install zlib-devel\r\n<\/pre>\n<p>In\u00a0<strong>Debian<\/strong>\u00a0we will need to install gcc, make, and the zlib compression \/ decompression library:<\/p>\n<pre># aptitude -y install gcc make zlib1g-dev\r\n<\/pre>\n<p>To install\u00a0<strong>Python 3.6<\/strong>, run the following commands:<\/p>\n<pre># wget https:\/\/www.python.org\/ftp\/python\/3.6.3\/Python-3.6.3.tar.xz\r\n# tar xJf Python-3.6.3.tar.xz\r\n# cd Python-3.6.3\r\n# .\/configure\r\n# make\r\n# make install\r\n<\/pre>\n<p>Now relax and go grab a sandwich because this may take a while. When the installation is complete, use which to verify the location of the main binary:<\/p>\n<pre># which python3\r\n# python3 -V\r\n<\/pre>\n<p>The output of the above command should be similar to:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1103 size-full\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/08\/python.png\" alt=\"latest python\" width=\"400\" height=\"88\" srcset=\"https:\/\/coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/08\/python.png 400w, https:\/\/coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/08\/python-300x66.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>To exit the Python prompt, simply type.<\/p>\n<pre>quit()\r\nor\r\nexit()\r\n<\/pre>\n<p>and press Enter.<\/p>\n<p>Congratulations!\u00a0<strong>Python 3.6<\/strong>\u00a0is now installed on your system.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Install_Python_IDLE_in_Linux\"><\/span>Install Python IDLE in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Python IDLE<\/strong>\u00a0is a GUI-based tool for Python. If you wish to install the\u00a0<strong>Python IDLE<\/strong>, grab the package named idle (Debian) or python-tools (CentOS).<\/p>\n<pre># apt-get install idle       [On Debian]\r\n# yum install python-tools   [On CentOS]\r\n<\/pre>\n<p>Type the following command to start the\u00a0<strong>Python IDLE<\/strong>.<\/p>\n<pre># idle\r\n<\/pre>\n<h5><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>In this article we have explained how to install the latest Python stable version from source.And to know about node js and installation <a href=\"https:\/\/www.coimbatorewebhosting.com\/blog\/how-to-installsetup-node-js-with-cpanel\/\">click here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Latest Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python&#8217;s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1105,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[17,3,1],"tags":[95,96,94],"class_list":["post-1100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","category-linux","category-latest","tag-centos-7","tag-python-idle","tag-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/python-feature.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pa2YU7-hK","_links":{"self":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=1100"}],"version-history":[{"count":0,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1100\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media\/1105"}],"wp:attachment":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=1100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=1100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=1100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}