Software⏱️ 2 min read📅 2026-05-31

How to Fix: Python command not working in command prompt

Python command not recognized as internal or external command.

Quick Answer: Check if Python is added to your system's PATH environment variable, which can be done by right-clicking on Command Prompt and selecting Properties > Advanced > Environment Variable.

When you encounter the 'Python command not recognized as an internal or external command' error, it's often due to Python being installed in a location that's not added to your system's PATH environment variable. This means that when you type python into the command line, Windows can't find the Python executable and returns the aforementioned error message.

🛑 Root Causes of the Error

  • Python installation location not in the system's PATH environment variable.

🔧 Proven Troubleshooting Steps

Method 1: Adding Python to PATH

  1. Step 1: Locate the Python executable. If you have Python 2.7 and Python 3.2 installed, they're likely in C: extbf{Python}32 or C: extbf{Python}27, depending on your version.

Method 2: Using the Python Launcher

  1. Step 1: Open the Control Panel and navigate to Programs and Features. Find the Python installation, right-click on it, and select Advanced. In the Turn Windows features on or off window, check the box next to Python 2.7 (or Python 3.2) and click OK.

✨ Wrapping Up

By following these steps, you should be able to resolve the 'Python command not recognized as an internal or external command' error and successfully run Python from the command line.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions