{"id":26,"date":"2018-06-19T22:04:42","date_gmt":"2018-06-19T22:04:42","guid":{"rendered":"http:\/\/wordpress.cs.vt.edu\/cs5045\/?page_id=26"},"modified":"2018-08-02T17:30:31","modified_gmt":"2018-08-02T17:30:31","slug":"installing-python-3","status":"publish","type":"page","link":"https:\/\/wordpress.cs.vt.edu\/cs5045\/installing-python-3\/","title":{"rendered":"Installing Python 3"},"content":{"rendered":"<h6>python 3<\/h6>\n<p>The older Python 2.7 is still used by some software, so it may be installed on your system; it is automatically a part of CentOS.\u00a0 However, we will only use <a href=\"https:\/\/www.python.org\/\">Python 3<\/a> in CS 5045, so it is essential that you have Python version 3.4 or 3.6 installed on your development system.\u00a0 See installation instructions below.<\/p>\n<h6>Installation from the python web site<\/h6>\n<p>You can always install the latest Python release from the <a href=\"https:\/\/www.python.org\/\">Python Web site.<\/a>\u00a0 However, their may be other ways that are easier for your system.\u00a0 We will just detail the installation for CentOS and MacOS.<\/p>\n<h6>installtion on centos<\/h6>\n<p>Open a terminal and use these commands<\/p>\n<pre>ssh -l root localhost\r\nyum -y update\r\nyum -y install https:\/\/centos7.iuscommunity.org\/ius-release.rpm\r\nyum -y install python36u\r\nyum -y install python36u-pip\r\npip3.6 install --upgrade pip\r\nyum -y install python36u-devel\r\nyum -y install python36u-tools\r\n<code><\/code><code><\/code><\/pre>\n<p>to install Python version 3.6.5.\u00a0 Type<\/p>\n<pre>python3.6 --version<\/pre>\n<p>to verify the installation.<\/p>\n<p>Much of this installation procedure is a simplification of the procedure <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7\">on this page.<\/a><\/p>\n<h6>installation on macos<\/h6>\n<p>On your Mac, first make sure you have the latest version of the Mac OS X operating system installed.\u00a0 First, get the <a href=\"https:\/\/brew.sh\/\">Homebrew package manager from this page.<\/a>\u00a0 Basically, you open a terminal and cut-and-paste the Ruby command to the command line.\u00a0 Then, also in the terminal, type these commands<\/p>\n<pre>brew install tcl-tk\r\nbrew install python --with-tcl-tk<\/pre>\n<p>&nbsp;<\/p>\n<p>to install Python 3. \u00a0Type<\/p>\n<pre>python3 --version<\/pre>\n<p>to verify the installation.\u00a0 This procedure also installs the convenient\u00a0<a href=\"https:\/\/brew.sh\/\">Homebrew package manager for MacOS<\/a>. You can install many useful packages and applications with Homebrew, so it will be worth your time to become familiar with it.<\/p>\n<p>The command for the Idle integrated development environment for Python 3 is<\/p>\n<pre>idle3<\/pre>\n<p>It should open without a problem.\u00a0 If there is a warning about tcl-tk, then something went wrong with the installation above.<\/p>\n<h6>installation on other LINUX distributions<\/h6>\n<p>Many Linux distributions do not yet have a package for Python 3, but some do.\u00a0 You can check your package manager to determine whether version 3.4 or 3.6 is available for you.\u00a0 Otherwise, you should look up the installation procedure online.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>python 3 The older Python 2.7 is still used by some software, so it may be installed on your system; it is automatically a part of CentOS.\u00a0 However, we will only use Python 3 in CS 5045, so it is essential that you have Python version 3.4 or 3.6 installed on your development system.\u00a0 See &hellip; <a href=\"https:\/\/wordpress.cs.vt.edu\/cs5045\/installing-python-3\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing Python 3<\/span><\/a><\/p>\n","protected":false},"author":172,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-26","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/users\/172"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":13,"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/pages\/26\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/pages\/26\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/wordpress.cs.vt.edu\/cs5045\/wp-json\/wp\/v2\/media?parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}