The Python programming language is becoming an increasingly popular choice for both beginners and experienced developers. Flexible and versatile, Python is powerful in scripting, automation, data analysis, machine learning, and back-end development.
In this guide, you will learn how to install Python on Windows 10 using the Python installer for Windows.
Note: It should be noted that you will need a Windows 10 computer with administrator privileges and an internet connection.
Steps to install Python on a Windows 10 PC
Step 1: Download Python installer
Go to the official Python download page for Windows.
Find a stable Python 3 release. Let us mention that this guide was tested with version 3.10.10.
Download the executable file by clicking the link appropriate for your system: Windows installer (64-bit) or Windows installer (32-bit).
Step 2: Run executable installer
Once the installer is downloaded, double-click the .exe file (e.g., python-3.10.10-amd64.exe) to run the Python installer.
Check the option “Install launcher for all users” which enables all users to access the Python launcher application.
Check the option “Add python.exe to PATH” which enables users to launch Python from the command line.
If you want to install Python with default features as described in the dialog, click “Install Now” and skip to Step 4 – Verifying the Python Installation. To install other optional and advanced features, click “Customize Installation” and proceed.
Optional Features include common tools and resources for Python, and you can install them all even if you don’t plan to use them.
Select some or all of the options presented.
Click Next.
You should see the Advanced Options section.
Select the options that suit your needs here. Our recommendation is to select them all.
Step 3: Adding Python to environment variables (Optional)
If you checked the “Add Python to environment variables” option during installation, skip this step.
If you want to access Python via the command line but did not add Python to your environment variables during installation, you can still do this manually.
Before starting, locate the Python installation directory on your system. The following directories are examples of default directory paths:
C:\Program Files\Python310: If you checked the “Install for all users” option during installation, the directory will be system-wide.C:\Users\Sammy\AppData\Local\Programs\Python\Python310: If you did not check the “Install for all users” option, the directory will be in the Windows user path.
If you installed a different version during setup, the folder name will be different but will still start with Python.
- Go to Start and type “advanced system settings” in the search bar.
- Click on “View advanced system settings”.
- In the System Properties dialog box, click on the “Advanced” tab and then click on “Environment Variables”.
- Depending on your installation:
- If you checked “Install for all users” during installation, select “Path” from the System Variables list and click “Edit”.
- If you did not check the “Install for all users” option, select “Path” from the User Variables list and click “Edit”.
- Click “New” and enter the Python directory path, then click “OK” until all dialog boxes are closed.
Step 4: Verifying Python installation
You can verify if the Python installation was successful via the command line or through the Integrated Development Environment (IDLE) application if you chose to install it.
- Go to Start and type “cmd” in the search bar. Click on “Command Prompt”.
- Enter the following command in the command prompt:
python --version
Output will look like this:
Plaintext
Output
Python 3.10.10
You can also check the Python version by opening the IDLE application. Go to Start and type python in the search bar and then click on the IDLE application.
You can start coding in Python using IDLE or your preferred code editor.