How to Set Up Python on Windows 10

Python is one of the general purpose languages.  Essentially, this is a way of saying it could be used to build just about anything once you have the correct tools and libraries. 

For backend web development, it is my professional choice.  But it has been utilized to great extent for data analysis, scientific computations, AI and even in the development of a wide range of games, mobile applications, desktop applications, and productivity tools.  So if you are thinking of what language to learn, I am pointing you in the Python direction.  It also has the advantage of not being in the group of “hard and complex” languages to learn. 

If you are new to python and need to set it up on Windows 10, these basic steps will get that done. 

Download Python

Visit the official Python download page and get the latest version of Python.  By default, the 32-bit Windows installer version is downloaded.  I would rather stick with this to avoid compatibility issues, but there are options for the 64-bit version. 

Note: there are 2 distinctions of python: Python 2 and Python 3.  While Python 2 is the earlier version of Python, it may still be the most used.  Python 3 is the current version and the future of Python.  Python 2 is scheduled to reach its end of life in 2020 and will only get bug fixes till at that point.  For this article I will only focus on Python 3. 

Install Python from Installer

Right-click on the downloaded file, and click “Run as Administrator,” which brings two options – choose “Customize Installation.” 

On the next window that appears, under optional features check all the checkboxes and click “Next.” 

Under the “Advanced Options” window it is important to set the location for the installation.  I will usually set it to my C drive, which in many cases will be the default location. 

Next, click on “Install.”  Close the installer when the install finishes. 

After the installation has completed, a success window is displayed.  Click “Close” to finish the installation.  But before you do, there are a few things displayed on this window that you may want to take note of. 

Online Tutorial: this is a good place for newbies to Python.  You get to know very useful basics, and I recommend it. 

Documentation: this is exactly what it’s called – a documentation – so basically what you should know about python: language references, library reference, how-tos, etc. 

2 comments

(1) Create PYTHONHOME=C:Python36-32 (2) Don’t bother with “…libsite-packages”.  That’s the default location that is implied, so adding it to the path is not needed and can be confusing.  Create PATH=%PYTHONHOME%;%PYTHONHOME%Scripts;

There is one very major bug in the install of Python on Windows.  They put crap in the c:Windows directory.  That’s very sinful and Python should NEVER mess with the OS directory.  As a result, you must make sure that PYTHONHOME is in front of WINDOWS in your PATH env var.  Java has a similar problem.  So both JAVA_HOME and PYTHONHOME need to be in your PATH in front of WINDOWS or you could have unpredictable problems.  Especially if you have multiple versions of Java or Python installed.  The fact that WINDOWS has Java and Python crap in it is a HUGE mistake.  If you don’t put JAVA_HOME and PYTHONHOME in front of WINDOWS in the PATH, things will work fine for a while.  Until one day something doesn’t work right, and you will not have a clue why.  I learned this lesson the hard way. 

BTW, Oracle has learned this lesson because newer versions of Java, Oracle has put JAVA_HOME up front, ahead of WINDOWS in the PATH.  Python org needs to wake up and realize they have the same problems with their default windows install.