DEV Community

Cover image for Python Installation Guide For Windows 11
Akinnimi Stefan Emmanuel
Akinnimi Stefan Emmanuel

Posted on • Edited on • Originally published at akinmanuel.hashnode.dev

Python Installation Guide For Windows 11

You should first make sure Python is correctly installed and added to the environment's path variable before attempting to run any Python programs on your Windows operating system.

I'll demonstrate how to verify if Python is installed for you in this article. If not, I will also demonstrate how to correctly install it on Windows for you. The technique works for other versions of Windows as well, however, I'll be using Windows 11 for this.

##Step 1: How to Check if You Have Python Installed in Your Windows Operating System

Use the following command to check the Python version in CMD or PowerShell:

python --version

Enter fullscreen mode Exit fullscreen mode

PowerShell showing the version of python installed

Your machine can run any Python application just fine if you receive the version of Python that looks like the result above. The Python version in your situation can be different.

PowerShell showing an error message

However, if you encounter the result you see above, it could indicate any of the following:

  1. You did not have Python installed on your computer, or
  2. Python's directory has not been added to the path of the

If Python is not installed on your Windows PC, you can follow the procedure below.

##Step 2: How to Install Python on Windows

To begin with, we must visit Python's official website.

Python's Official website

An image showing the home page of python

Click on the Downloads section.

This page contains the most recent version. Simply click on Python 3.11.4 Download. Python may have been updated by the time you read this article, in which case the version would be different. Just download the version that is displayed.

An executable file

Once the file has been downloaded, you will receive an executable file similar to this in your downloads folder. The installation wizard will launch when you simply double-click that file.

Python installation wizard pop-up

Click on Customize Installation.

Python installation set up wizard

Check all the boxes as indicated above. Then click on the next button.
The screen below will then appear. You can check every box if you so choose. The debugging symbols and binaries are not necessary for me. Therefore, I won't check the latter two boxes.

Python installation pop up menu showing the advanced option

Additionally, I advise against moving the installation's position. Keep in mind the installation location in case you need it later. Here, we directly add Python to the environment variables. Then click Install.

Python installation setup in progress
Let the installation finish (it will take about two to three minutes)…

Python installation setup in progress

Simply check the button if you receive a prompt asking you to disable the path length limit. By removing the restriction on the MAX_PATH variable, it disables the path length restriction.

Python setup was successful

Nothing will be damaged or changed negatively as a result of this change. Only long path names will be supported by Python. It is advised to turn off the path length limit.

Python setup was successful

The installation has been completed successfully.

##Step 3: How to Check the Python Version Again to Confirm Python has been Installed

We must now confirm once again whether Python was correctly installed and added to the environment variables' path. launch CMD or PowerShell in order to verify that. Next, we can check the availability of Python on our machine with the following command:

python --version
Enter fullscreen mode Exit fullscreen mode

Windows PowerShell showing the version of Python installed

Python has been installed, and the path has also been added to the environment variables successfully!

Now, to the last step.....

##Step 4: How to Check the Path of the Environment Variables

If you want to manually check the path variables, you have to open the Advanced System Settings. You can search for Advanced System Settings or open that from the Control Panel.

Windows search bar

Window's 11 control panel

Go to System and Security.

Window's 11 control panel

Click on System.

Window's 11 control panel

From here, click on Advanced System Settings.

window's 11 about section

Click on Environment Variables.

A pop up menu showing the advanced system settings

Click on Path, and then click Edit.

Image showing the environmental variables

You will see that the root directory of Python311 and the scripts directory of Python311 have already been added in the installation process, as we checked the box to do these during the installation.

Image showing the python environment variable

Congratulations! By following the steps above, you now have Python installed on your machine. You can now pick any IDE suitable for Python and start writing and executing Python code.

Top comments (0)