In this Post we will be learning how to install python on our Windows PC. First of all we need to be sure whether we are using 32-bit system or 64-bit. To find it out, right click on ‘This PC’ icon on your desktop and click ‘properties’, there you will find the ‘System type’.
Alternatively, you can do a Cortana search or ‘windows + F’ search for “System Information” to find out the same.
Once you are sure about your system type head to https://www.python.org/downloads/, it will show you the latest stable version of Python. It generally automatically detects your OS and shows you a download button for the latest version of Python for that OS. At the time of writing this blog, the version was 3.7.2
But in case of Windows, the things get little trickier, by default it will download the 32-bit installer and if you are on a 64-bit system, select windows from the above page and then select ‘Download Windows x86-64 executable installer’ on the next page to download the suitable installer.
Once, the ‘executable installer’ is downloaded, double click to open it and you will get the following screen:-
There are two things you need to follow here to successfully install Python:-
- You need to tick/select ‘Add Python 3.7 to PATH’
- You need to click on “Customize Installation” to get to next window (Very Important)
Now keep all the option especially ‘pip’ clicked/selected (this will be by default, and you need not change it)
Click next and select/tick the following options:-
- Install for all users
- Associate files with Python(requires the py launcher)
- Add Python to environment variables
- Precompile standard library
Set ‘Customize install location’ as ‘C:\Python3X’ (replace X to match the stable version you have downloaded e.g. Python37)
Once the installation is complete, search and open ‘Windows Powershell’ and type
python -V
If the output is :-
Python 3.7.2
or the version which you have installed you are good to go, otherwise uninstall Python and re-install it by following the exact steps mentioned above.
One more thing, we need to confirm is whether ‘pip’ is working or not? For that type the following in Powershell. if there is no error, the installation is fine.
pip freeze
if you get the following type of error, you will have to uninstall python and re-install the same using the exact steps as above.
The term 'pip' is not recognized as the name...