(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{540:function(t,e,o){"use strict";o.r(e);var a=o(56),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"how-to-install-python-on-your-computer"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#how-to-install-python-on-your-computer"}},[t._v("#")]),t._v(" How to install Python on your computer ")]),t._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"#on-windows"}},[t._v("On Windows")])]),t._v(" "),o("li",[o("a",{attrs:{href:"#on-mac"}},[t._v("On Mac")])])]),t._v(" "),o("p",[t._v("In this lecture I'll guide you through installing Python on your computer. If have already installed Python, feel free to skip to the next lecture!")]),t._v(" "),o("h2",{attrs:{id:"on-windows"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#on-windows"}},[t._v("#")]),t._v(" On Windows")]),t._v(" "),o("p",[t._v("To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.9.6.")]),t._v(" "),o("div",{staticClass:"custom-block danger"},[o("p",{staticClass:"custom-block-title"},[t._v("Add to PATH")]),t._v(" "),o("p",[t._v('As you go through the installer, make sure to check "Add Python to PATH".')])]),t._v(" "),o("p",[t._v("Once Python is installed, you can execute the program "),o("code",[t._v("cmd.exe")]),t._v(". This is a command-line interface to your computer. Here, just type the word "),o("code",[t._v("python")]),t._v(" and that will start the Python program.")]),t._v(" "),o("p",[t._v("At all points during the course, you can always type "),o("code",[t._v("python name_of_file.py")]),t._v(" and that will execute the code of a file called "),o("code",[t._v("name_of_file.py")])]),t._v(" "),o("p",[t._v("If you have multiple versions of Python installed, such as a version you installed a while ago, you'll need to use the complete path to Python in order to run it. Usually it'll look something like this:")]),t._v(" "),o("div",{staticClass:"language- extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[t._v("C:\\\\Users\\\\yourname\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python39-32\\\\python.exe\n")])])]),o("h2",{attrs:{id:"on-mac"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#on-mac"}},[t._v("#")]),t._v(" On Mac")]),t._v(" "),o("p",[t._v("To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.9.6.")]),t._v(" "),o("p",[t._v("Once Python is installed, you can execute the program "),o("code",[t._v("Terminal.app")]),t._v(". This is a command-line interface to your computer. Here, just type the word "),o("code",[t._v("python3.9")]),t._v(" and that will start the Python program.")]),t._v(" "),o("p",[t._v("At all points during the course, you can always type "),o("code",[t._v("python3.9 name_of_file.py")]),t._v(" and that will execute the code of a file called "),o("code",[t._v("name_of_file.py")])])])}),[],!1,null,null,null);e.default=n.exports}}]);