How to setup Python in a windows machine

Desira Wijesundara
3 min readMar 21, 2019

Even though Python is one of the easiest languages to learn, the installation process of this application is a bit tricky and might throw you off guard. So here’s a step by step guide on how to get Python up and running, quite specifically in a machine with Windows 10.

Downloading Python

Head up to https://www.python.org/

Under the ‘downloads’ tab you’ll see the option to download the latest version that’s available,which in this case is ‘Python 3’. You can download earlier versions of Python, although I don’t recommend it. ‘Python 2’ is still used in the market and has it’s expiry date at 2020, so starting off with ‘Python 3’ is the way to go. Besides ‘ Python 2’ and ‘Python 3’ are drastically different from each other, and it would be highly beneficial for you if you start your journey from the version of ‘Python’ that is more robust.

You will get a prompt to choose between ‘keep’ or ‘discard’, just like Morpheus did Neo with a red pill and a blue pill. Choose ‘keep’ to see how far the rabbit hole goes.

The installation process will be like any other; don’t read the terms and conditions yet agree upon them, and click next till you finish the installation.

Setting up the environment for Python

Why we do this is to access Python through any command prompt line, and to do so we must add the installation directory to the ‘Path’ system environment variable, which gives the authority for Python to run any sort of script in ‘Command prompt’, ‘Powershell’ or any other shell that’s available on your system.

  1. Copy the ‘Python’ directory to your clipboard.

2. Head up to;

‘Properties’ of ‘This PC’
Then ‘Advanced System Settings’
Proceed to Environmental Variables
Click on New
Give the variable a name (in this case I named it ‘ Python’) and paste the ‘Python’ install directory that you copied to your clipboard. Click ‘OK’
As you can see the ‘PYTHON’ variable has been added.
Locate ‘Path’ under ‘System variables’ and click on ‘Edit’
Then click ‘New’
Then paste the ‘Python’ directory here as well. And make sure to click ‘OK’.
Now just type in ‘Python’ in Command Prompt and you can see it is working perfectly.

But we are not quite done yet since we have to install an ‘integrated development environment’ or IDE for short, for ease of use. There are many applications out there that provide a comprehensive programming experience namely ‘Microsoft Visual Studio’ , ‘Notepad ++’ , ‘Net Beans’ and a lot more. The choice is yours. Once you installed an IDE you are good to go. Happy coding!

--

--