‘python’ is not recognized as an internal or external command

Today in this article, we will cover below aspects,

Issue Description – Python is not recognized

Python commands give errors in CLI or Powershell,

‘python’ is not recognized as an internal or external command,
operable program or batch file.

Resolution

The issue seems to be the missing path required to be configured before using Python commands from CLI/Commands prompt or Powershell.

The issue can be fixed easily using the below steps,

Steps:

  1. Find out the python.exe location path on your machine
  2. Either way, if you obtain the path of the python.exe, please copy the path and add it to the PATH variable in the Environment Variable settings.

python is not recognized

For most of you default location would be any of the below, please check and confirm your location,

Example

“C:\Python37”

or

“C:\Python27”

or

%USERPROFILE%\AppData\Local\Programs\Python\Pythonxx-xx

or

On a Windows machine with Visual Studio installed, path can be found at below,

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64

python is not recognized

After the above updates, You shall see Python commands are available and accessible from anywhere in the Machine.

From Command Prompt CLI

python is not recognized

From Powershell

python is not recognized

References:

Did the above steps resolve your issue? Please sound off your comments below!

That’s all! Happy coding!

Does this help you fix your issue?

Do you have any better solutions or suggestions? Please sound off your comments below.



Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published(2024) best practices and guidelines for software design and development.



Leave a Reply

Your email address will not be published. Required fields are marked *