How to Solve Python Is Not Recognized in Windows 10

Rana Hasnain Khan Feb 15, 2024
How to Solve Python Is Not Recognized in Windows 10

We will introduce how to resolve the 'python' is not recognized error on Windows 10.

Fix 'python' is not recognized Error in Windows 10

When we are starting to learn Python, and we have just downloaded and installed Python on our system, sometimes, while running the code on our system or checking the version of Python will give an error saying 'python' is not recognized, as shown below.

python not recognized in windows 10

We will go through steps to resolve this issue quickly on Windows 10.

First, we will go to the desktop, right-click on the My Computer icon, and click Properties, as shown below.

My Computer Properties

We will go to the Advanced tab from the system properties.

system properties

From the Advanced section, we will click on the Environment Variables button. Now we will highlight the Path variable and click on the Edit button, as shown below.

add path to Environment Variables

Now we will add the path of our Python executable c:\Python27. Putting semicolons at the end of each directory for different languages or variables is important.

It is also important not to put spaces between elements in the PATH.

Now we will apply the changes and restart our system, though simply restarting cmd.exe should be sufficient. Now, let’s launch cmd and try again. It should work, as shown below.

Working solution of python not recognized

Rana Hasnain Khan avatar Rana Hasnain Khan avatar

Rana is a computer science graduate passionate about helping people to build and diagnose scalable web application problems and problems developers face across the full-stack.

LinkedIn

Related Article - Python Error