<center></center>
<p>In this post, I will discuss how to install Python on Windows. Unlike operating systems such as Linux or Mac, which have Python by default, we need to install Python on Windows.</p>
<p>This mentality that because Python is not installed on Windows, so Windows won't be a good environment for Python, <strong>is wrong</strong>! We can have Python with all the features on our system after going through the guide to <strong>install Python on Windows</strong> that we see below.</p>
<p>Python programming language is one of the most popular programming languages in the world, which has made the learning process very easy due to the simplicity of its codes.</p>
<p>No special hardware or prerequisites are required to install python on Windows! We can install Python version 2 or 3 on it.</p>
<p>In this post, I will install Python in just 3 steps. These three steps are: download, install, run or final setup!</p>
<h3>The right version for installing Python on Windows</h3>
<p>So far, there are two main and stable versions for Python:</p>
<ul>
<li>Python version 2</li>
<li>Python version 3</li>
</ul>
<p>These two versions have differences. One of the main ones is the difference in the syntax of these two versions.</p>
<p>For example, for printing in Python version 3, the statement <code>print()</code> is used, while in version 2, only <code>print</code> is used.</p>
<p>If you are installing Python on Windows to learn Python, it might be better to use the latest version.</p>
<p>But if your goal is to install Python, use the <strong>library</strong> or special python tools, it is better to first check the version of the library or the program you want.</p>
<p>Some of the most used Python libraries are still released in version 2 and are still supported on the same version.</p>
<h3>Download Python (Python installer)</h3>
<p>To download Python, go to https://www.python.org/downloads/. In this address, by default, your operating system is detected and the option to download the latest version of Python is displayed.</p>
<center></center>
<p>If for some reason your operating system is not detected, go to https://www.python.org/downloads/windows/. At the beginning of this page, you will see two links to download the latest versions of Python 3 and 2.</p>
<center></center>
<p>Click on the desired version to enter another page. At the end of this page, you will see a list similar to the one below.</p>
<p>To install Python 3 on Windows, you need to download files named <strong>Windows Installer</strong> or <strong>Windows Executable Installer</strong>.</p>
<ul>
<li>For Windows 64-bit file</li>
<li>For Windows 32-bit file</li>
</ul>
<center></center>
<h3>How to install Python 3 on Windows</h3>
<p>After downloading the Python installer file for Windows, just double-click on it to launch the installation program.</p>
<p>Windows 7 and Windows 10 may display a warning message like below. Because we have downloaded the file directly from the Python Software Foundation website, there is no problem and we can allow it to install by clicking <strong>Allow</strong>.</p>
<center></center>
<p>The first page of Python 3 installation will look like below. We have two choices for how to install Python:</p>
<ol>
<li>Install with default settings</li>
<li>Install with custom settings</li>
</ol>
<p>Usually, the default settings of Python in the installation process are sufficient and perfect for us!</p>
<h3>Guide to installing Python on Windows 10</h3>
<ol>
<li>On this page, there is an option called <strong>Add Python 3.9 to PATH</strong>. Be sure to enable this check box to <strong>run Python in cmd</strong>.</li>
<li>Then click on the first button (Install Now) to go to the next step.</li>
</ol>
<center></center>
<p>At this stage, we have to wait for the completion of Python installation in Windows...</p>
<center></center>
<p>After the Python installation bar is completed, we go to a page titled <strong>Setup Was Successful</strong>.</p>
<p>This page is the last step of the installation process. At the end of the page, there is a button called <strong>Disable Path Length Limit</strong>.</p>
<center></center>
<p><strong>It is better to briefly know what Disable Path Length Limit is?</strong></p>
<p>There is a limit on the <strong>MAX_PATH</strong> variable in the Windows operating system. This variable limits the length of names chosen for <i>path</i> variables.</p>
<p>Some Python developers and professional programmers find the path length limit cumbersome and sometimes cause errors in program execution.</p>
<p>However, removing the <strong>MAX_PATH</strong> limit will not harm your operating system. If you want to pursue Python professionally, it might be worth picking up. But with it active in normal mode, you will not have any particular problem.</p>
<p>You can also remove this restriction from the operating system later if needed. You just need to use your search power a little! 🙂</p>
<p>By clicking on <strong>Close</strong>, the installation of Python in Windows will be finished.</p>
<h3>Checking the correct installation of Python on the system</h3>
<p>Open your <i>cmd</i> program (or the same <i>Command Prompt</i>) to ensure correct installation and apply the <strong>path settings of Python</strong>. Now enter the following command in it and run it.</p>
<pre><code>python -v</code></pre>
<p>As a result of this command, you will be shown the version of Python you have installed. For example, you will be shown the following value:</p>
<pre><code>Python 3.9.0</code></pre>
<h3>Run Python installed on Windows</h3>
<p>After the installation is complete, open your Windows or <i>start</i> menu. You can see that at the beginning of the list (the most recent programs) the names of three Python software have appeared.</p>
<center></center>
<p>If you don't see these icons, that's okay. Just search for <i>python</i> in <i>Start</i> and their names will appear.</p>
<p>Now run the <i>IDLE</i> program. This program is a good IDE for running Python code. In this IDE, you can write your codes in a console-like environment or define a separate file for it.</p>
<center></center>
<p>In this post, I discussed how to install the third version of python. We learned that first we need to download the Python installation exe software from the main Python site and install it by performing the installation process. This will also install IDLE, which is a simple coding environment for Python.</p>
<p>If you have any questions about the installation process or experience in this regard, the comments section is for you!</p>