{"id":1848,"date":"2020-06-03T04:37:02","date_gmt":"2020-06-03T04:37:02","guid":{"rendered":"https:\/\/www.afternerd.com\/blog\/?p=1848"},"modified":"2020-08-06T07:16:21","modified_gmt":"2020-08-06T07:16:21","slug":"setup-python-on-windows","status":"publish","type":"post","link":"https:\/\/www.afternerd.com\/blog\/setup-python-on-windows\/","title":{"rendered":"How to Setup Python 3 on Windows? (Step-by-Step)"},"content":{"rendered":"<p>In this article, I will teach you how to set up the Python environment on your Windows operating system.<\/p>\n<p>I will walk you through the installation process and discuss all the installation options that you will come across.<\/p>\n<p>Since this content is better consumed in a video format, here is a video that walks you through the process step-by-step.<\/p>\n<p>If video is not your thing, continue with the rest of the article.<\/p>\n<p><iframe loading=\"lazy\" title=\"How to Setup Python 3 on Windows? (Step-by-Step)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/SsnGXKWFo30?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>We&#8217;re not going to be covering Linux and Mac, I will talk about those in a later article.<\/p>\n<p>Python doesn&#8217;t come pre-installed in your Windows operating system as it does with Mac and Linux so if you have a windows operating system, you basically need to set up everything on your own.<\/p>\n<p>But as we&#8217;ll see, it&#8217;s not really that hard!<\/p>\n<p>The first thing that you need to do is to head over to the <a href=\"https:\/\/python.org\/downloads\" target=\"_blank\" rel=\"noopener noreferrer\">official Python download site<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1860\" src=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-1024x395.png\" alt=\"\" width=\"1024\" height=\"395\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-1024x395.png 1024w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-300x116.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-768x297.png 768w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-200x77.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-400x154.png 400w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-600x232.png 600w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-800x309.png 800w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM-1200x463.png 1200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.52.38-PM.png 1668w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This is where all the different versions of Python exist.<\/p>\n<p>Basically, there are two major versions of Python.<\/p>\n<p>There is <strong>Python 2<\/strong>, and there is <strong>Python 3<\/strong>.<\/p>\n<p>Python 2 has reached what is called the end-of-life.<\/p>\n<p>This means that Python 2 is not going to be supported anymore. For example, if there is a security vulnerability found in Python 2, no one from the maintainers of Python is going to fix it.<\/p>\n<p>If there&#8217;s a bug in the language or in a library, no one&#8217;s going to fix it.<\/p>\n<p>So please do yourself a favor and learn Python 3 because Python 2 is pretty much dead.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1861\" src=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-1024x273.png\" alt=\"\" width=\"1024\" height=\"273\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-1024x273.png 1024w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-300x80.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-768x204.png 768w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-200x53.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-400x107.png 400w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-600x160.png 600w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-800x213.png 800w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.55.02-PM-1200x320.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Alright, go ahead and download the latest stable Python 3.<\/p>\n<p>Now, I want you to notice the path where Python is going to be installed.<\/p>\n<p>Another thing that I want you to notice is the two checkboxes at the bottom of the installation window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1862\" src=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-1024x626.png\" alt=\"\" width=\"1024\" height=\"626\" srcset=\"https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-1024x626.png 1024w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-300x184.png 300w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-768x470.png 768w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-200x122.png 200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-400x245.png 400w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-600x367.png 600w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-800x489.png 800w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM-1200x734.png 1200w, https:\/\/www.afternerd.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-03-at-4.56.39-PM.png 1396w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>One says that it will install <strong>launcher<\/strong> for all users, which is enabled by default.<\/p>\n<p>The second says if you want to add Python to <strong>PATH<\/strong>.<\/p>\n<p>Let&#8217;s go ahead and enable both of them. I will talk soon about what each does.<\/p>\n<p>All that&#8217;s remaining now is to wait for the installation to complete.<\/p>\n<p>Congratulations! Now Python is fully installed on your Windows machine.<\/p>\n<h2>What got installed?<\/h2>\n<p>Here are the main programs that got installed during this process.<\/p>\n<h3>1- The Python interpreter<\/h3>\n<p>This is the system that compiles and interprets Python&#8217;s source code. It is the main component of Python.<\/p>\n<h3>2- The Python interactive shell<\/h3>\n<p>This is an interactive shell that allows you to input a Python command, execute it, and check the result right away.<\/p>\n<p>The interactive shell is where you will be spending most of your time when you&#8217;re starting out learning Python because you will be able to try out things and get instant results.<\/p>\n<h3>3- IDLE<\/h3>\n<p>This is a nice GUI interface to the Python interactive shell.<\/p>\n<p>In addition to that, it also serves as a very basic editor for Python which allows you to write longer Python programs.<\/p>\n<h3>4- The launchers<\/h3>\n<p>The launcher is the program that allows you to execute a Python file by just double-clicking it.<\/p>\n<p>It also allows you to select which Python version to use when you launch a Python program (in case you have multiple versions).<\/p>\n<h2>Featured Posts<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/learn-python\/\">The Python Learning Path (From Beginner to Mastery)<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/learn-computer-science\/\">Learn Computer Science (From Zero to Hero)<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/coding-interview\/\">Coding Interview Preparation Guide<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/stock-investing-for-beginners\/\">The Programmer&#8217;s Guide to Stock Market Investing<\/a><\/li>\n<li><a href=\"https:\/\/www.afternerd.com\/blog\/start-programming-blog\/\">How to Start Your Programming Blog?<\/a><\/li>\n<\/ul>\n<div class=\"after-post-box\">\n<h2>Are you Beginning your Programming Career?<\/h2>\n<h3>I provide my best content for beginners in the newsletter.<\/h3>\n<ul>\n<li>Python tips for beginners, intermediate, and advanced levels.<\/li>\n<li>CS Career tips and advice.<\/li>\n<li>Special discounts on my premium courses when they launch.<\/li>\n<\/ul>\n<p>And so much more&#8230;<\/p>\n<h3>Subscribe now. It&#8217;s Free.<\/h3>\n<p><script type=\"text\/javascript\" src=\"\/\/mautic.afternerd.com\/form\/generate.js?id=2\"><\/script><\/p>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":2512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[13],"yst_prominent_words":[383,272,1665,1632,1650,1666,1641,1228,1251,1633,149,150,1644,1639,1657,1374,1654,1631,1645,1638],"_links":{"self":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/1848"}],"collection":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/comments?post=1848"}],"version-history":[{"count":5,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/1848\/revisions"}],"predecessor-version":[{"id":2570,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/posts\/1848\/revisions\/2570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/media\/2512"}],"wp:attachment":[{"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/media?parent=1848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/categories?post=1848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/tags?post=1848"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.afternerd.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=1848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}