In this tutorial, we will learn how to install Python for Windows.
Unlike other popular programming languages (such as C and C++), Python uses an interpreter which is just a computer program that directly executes written instructions. This also means that all scripts written in Python are executed line by line and not all at once.
Install Python for Windows
It is quite rare that a Windows operating system comes pre-installed with Python. However, installing it by yourself is pretty simple and quick.
To install Python for Windows, all you have to do is download an executable installation file from Python’s official website and run it on your system. However, do make sure that you download the latest stable build of the Python interpreter.
Follow these instructions for installing Python on Windows:
1. Download the latest stable build of Python from the following link: https://www.python.org/downloads.
2. Once the installer has been downloaded, run it. Make sure to select ‘Add Python 3.8 to PATH’ and press on ‘Install now’. If your downloaded Python version is different from Python 3.8 then the version name on the option will be different.
The installation time can take anywhere from 30 seconds to 2 minutes. Once the installation finishes, you are ready to use Python!
Checking if the Python installation is working
After you install Python for Windows it is time for you to check if it is working.
Open Command Prompt and type python. If you see a similar kind of message in your Command Prompt window, then you have successfully installed Python.
Note: Your Python version may be different from the one shown in the image, depending on the version that you installed from the Python website.
Let us try writing a simple Hello World program to see the Python interpreter in action.
print("Hello, World!")
Hello, World!
You have successfully written your first line of Python code. If you get stuck anywhere, please feel free to let us know in the comments.
Do you want to learn Python, Data Science, and Machine Learning while getting certified? Here are some best selling Datacamp courses that we recommend you enroll in:
- Introduction to Python (Free Course) - 1,000,000+ students already enrolled!
- Introduction to Data Science in Python- 400,000+ students already enrolled!
- Introduction to TensorFlow for Deep Learning with Python - 90,000+ students already enrolled!
- Data Science and Machine Learning Bootcamp with R - 70,000+ students already enrolled!