Python Installation Guide For Windows 11
Tags: beginners, tutorial, python, programming
Published: 2023-07-26 23:45:37



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

```

![PowerShell showing the version of python installed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ojkzwgef91jqwb8g75n.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2m9mbx68toio3zwa0s74.png)



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](https://www.python.org/)


![An image showing the home page of python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6rtc7x2mw7ct4xr5ky7t.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3xfelah10obmyxw00q5.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyglufgrsotf8bpexzq3.png)




Click on Customize Installation.


![Python installation set up wizard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx9a7w6zlh2wkiqn6qtc.png)


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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grqsbym5cl0p80bfiyn0.png)



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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jugooel7zzbg9n59qafb.png)
Let the installation finish (it will take about two to three minutes)…



![Python installation setup in progress](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qc4xy2y5znn3xs1i8vd7.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fbeawxiowoo4g3rd8z8.png)


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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/swm0snr0rfx4rewezmd1.png)



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
```



![Windows PowerShell showing the version of Python installed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6c61lmh42xxgwe33un3.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u30uft27qib8dmfx4h7t.png)

![Window's 11 control panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a72nsy30ol556l662651.png)


Go to System and Security.


![Window's 11 control panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4e729lmr05g0b7cr6tr.png)


Click on System.

![Window's 11 control panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7n6mm80c33joxtjax5d.png)


From here, click on Advanced System Settings.


![window's 11 about section](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39uqi65zzzco018mekag.png)

Click on Environment Variables.


![A pop up menu showing the advanced system settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsa9g4y2vsbsdaxtn3db.png)


Click on Path, and then click Edit.


![Image showing the environmental variables](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tcmna7jh1sctzm5urxpj.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v3dk9tc2t8mfmtw6jfuu.png)


*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.*