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.
- What’s new: informing you about new features of the release.
Also read: Upgrading and Using Python 3 on a Mac
Setting the System’s PATH Variable
Python components will be added later to the installation, so directories for these need to be created. To do this, following the below instructions:
1. Open Control Panel.
2. Search for “Environment -> Edit the System Environment Variables -> New”. (if the Path already exists, click “Edit” rather than “New.”)
3. Enter the following values:
C:\Python36-32;C:\Python36-32\Lib\site-packages;C:\Python36-32\Scripts
and under name, enter “PATH.”
4. Click “OK” and exit all control panel dialogs.
Loading Python Interpreter
Next, you have to open the Control Panel (Win + R, type cmd
, hit Enter).
In the control panel type “Python” and hit Enter. This command loads the python interpreter, where you can go ahead and type whatever Python code you want.
To exit, type exit()
and hit Enter.
Conclusion
As you can see, it is pretty easy to set up Python on Windows. You can easily set it up and get it running in a couple of minutes. If you face any issues, do let us know in the comments below.
Our latest tutorials delivered straight to your inbox