Introduction
Hello and welcome to another tutorial on Learn Code Today. Today we are going to learn how to install Python to your computer. There are several different ways to install Python to our systems, but we are going to look at what I call a “Hard Install”. This means that we will install Python directly to our PC and not to something like Docker which containerizes installs so they don’t conflict with one another on a system. Let’s begin!
Step 1
To start, we need to navigate over to the Python website. Head over to https://www.python.org/ and you will see a downloads button right on the front page.
Click on the “Downloads” button on the navigation bar, and it will take you to yet another page that will allow you to choose which version you would like to download.
Now quick caveat. This will always download the 32-bit installer. If you are looking for the 64-bit installer, you will need to scroll down the page until you see the spot that says, “Looking for a specific installer”. This is where you will click the latest version and be taken to another page that will have the source files, exe’s, and web installers in both 32-bit and 64-bit.
So you can see in the picture directly above, I have indicated with check marks, which python installer is 64-bit. While 32-bit is often enough for most people, if you have more than 4GB of RAM in your PC, you can benefit from running 64-bit Python on your system. If you have less than 4GB, most likely you are only running a 32-bit version of Windows, and installation will fail when trying to install the 64-bit version.
Ok enough technical speak, lets move onto downloading and installing Python! So once you have clicked the version you would like, a download prompt will appear asking you where you would like to put the installer. You can rename the installer if you like and put it anywhere easy to remember on your system.
Step 2
Ok, once you have the installer saved to your system. Its now time to run it. Quick side note, if you downloaded one of the optional installers as I highlighted above for the 64-bit version, make sure you understand how to run it. If it was the zip file, extract the contents first, and then double click the installer. If it was the EXE, well then all you need to do is double click it just like those that download it directly from the button on the second page without going for the 64-bit version.
Ok, now that you have opened the installer, you will be greeted by a first screen. It is important that you check the box at the bottom that says, “Add Python 3.X to Path” or something along those lines. This will save you major headaches down the line when trying to run python or scripts from the command line. Once you have checked that box, you can proceed with the normal installation by selecting “Install Now”. If you prefer to install Python to a different location, go ahead with the custom install and provide the location and proceed as normal from there.
Once you begin the actual installation, it should go pretty quick, depending on your internet connection. There will be a UAC popup requesting permission to continue, so make sure to approve that to get the actual installation underway.
Once the installer has completed, one final screen will appear asking you if you want to disable the path length limit. I would advise selecting yes for this option. Clicking on it will bring about yet another UAC popup. Just confirm and it will take you back to the complete screen with a “close” button in the lower right hand corner. You can now safely close the installer and Python is successfully installed on your system!
Step 3
Congratulations! You can now start using python on your system. To get started, simply navigate to the windows start menu, and in the recent programs section at the very top, you should see something like this:
Click on the IDLE option and an interactive display will appear allowing you to start coding in real time with Python. You can also just open up the Command Prompt (CMD) and type in Python and hit “Enter” or “Return” and it will launch an interactive version there as well.
Conclusion
That is it for this tutorial. I hope you found it helpful. If you are on MAC or Linux, the process is fairly straight forward as well. With MAC, you install python just like any other MAC program and there is a section on their website with the download and instructions on how to do so. For Linux, just use your favorite package manager or compile from source and you are good to go! Most Linux distros come with Python pre-installed already as it is, but it is often and older version. I assume also, that if you are on Linux, you are already fairly familiar with installing applications and decent when it comes to being “tech savvy” and are more than capable of figuring it out.