By Lenin Mishra
Over the years, Python has become one of the most popular programming languages. It has its application in many fields. Installing Python is the first step towards becoming a python programmer in 2021.
In this article, you will learn to install Python 3 on windows. Since 2020, Python 2 has already become obsolete. The whole world has switched to Python 3 and for all the right reasons.
This article will show you how to install Python 3.9(the latest version) and start programming using the command line interface.
Step 1 - Visit Python official website
Visit the official website of the Python Programming language and click on Downloads.
Step 2 - Download the latest version of Python
Once you are in the Downloads page, click the button for the Latest Python 3 Release -
Download Python 3.x.x.
As of today, the latest version was Python 3.9.1.
Once you click on the Download button, the installer should be downloaded.
Step 3 - Start Installation
Double click on the installer to start the installation process for Python 3.9. It will open up a dialog box like below.
Make sure to check the dialog box for “ADD Python 3.9 to PATH” present at the bottom of the dialog box.
By adding Python 3.9 to PATH, you will be able to execute Python interpretor from any directory in your Windows system.
Then click on Install Now. You should see the installation process begin.
Step 4 - Successful Setup
If your installation process ran fine, you should see a Successful Setup message like below. You can close the dialog box after this message.
You are now ready to run Python.
Step 5 - Check your Python version
Open your Command line terminal and type
You should see the version of Python that you have downloaded.
Step 6 - Hello World!
python on your command line terminal and press
Enter. This opens an interactive session of Python 3.9 on your terminal
In your interactive session, type
print("Hello World!") and press
Now you can run any kind of python code in this interactive session. Try doing some mathematical calculation and see how Python works with arithmetic operators.
Next Step - You need to download a Python IDE. Check out our articles.