Skip to content
Advertisement

The Python executable is not recognized on Windows 10

I recently installed Python 3.6.3 on my device. When I type python in my cmd window, it gives me this error. I do have the PATH in the environment variables. Path Lists. This should normally fix it, but python is still not recognized.

Advertisement

Answer

The path to the Python executable needs to be in the System PATH variable. Note this is not the User PATH variable.

The OP had Python 3.6.3 installed in C:PythonPython36-32, however a common default location for installation is in the users AppDataLocalPrograms folder. This post will assume a Python 3.10 installation in this location. Please adjust as needed for your current Python version and path.

You can confirm the path from the command prompt by checking the Python executable directly from the folder.

cd %LOCALAPPDATA%ProgramsPythonPython310
python --version

This should print the Python interpreter version. For example, Python 3.10.4.

Add the following entries to the System PATH:

  • %LOCALAPPDATA%ProgramsPythonPython310 for the python executable
  • %LOCALAPPDATA%ProgramsPythonPython310Scripts for tools such as pip

After adding the path to the System PATH variable, make sure you close and reopen any command prompts, so they use the updated PATH.

Advertisement