Running a Python script only to see “Python is not recognized as an internal or external command” is one of the most common beginner stumbling blocks. Before installing Python, configuring a development environment, or troubleshooting a broken automation script, the first step is always the same — verify whether Python is already present on the system. This takes under thirty seconds on any operating system and prevents the wasted time of reinstalling something that’s already there, or missing the fact that it’s simply misconfigured rather than absent.

Why Python Might Be Present Without You Knowing
Python comes pre-installed in many situations that aren’t immediately obvious. Most Linux distributions include Python as part of the base system. macOS shipped with Python 2 by default for years and now includes Python 3 on newer versions. Developer tools, software packages, game launchers, and applications frequently install Python silently as a dependency. The result is a machine where Python exists but the user has no idea it’s there.
Checking before installing saves time and avoids duplicate installations that conflict with each other.
Checking on Windows
Open Command Prompt by pressing Windows + R, typing cmd, and pressing Enter. Alternatively search for “cmd” in the Start menu.
Type the following and press Enter:
python –version
If Python is installed and configured correctly, the output shows the version number:
Python 3.14.5
If Python is not installed, Windows 10 and 11 may open the Microsoft Store instead — this is a placeholder app trigger, not a Python installation. Close the Store and consider installing Python from python.org. On older Windows versions, the error reads:
‘python’ is not recognized as an internal or external command
If the python command fails but you suspect Python was installed via a specific tool, try:
python3 –version
or:
py –version
The py launcher is a Windows-specific utility that manages multiple Python versions and often works even when python doesn’t.
Checking the Python Installation Path on Windows
To confirm where Python is installed on the system, run:
where python
If Python is installed, this returns the full file path — for example, C:\Python314\python.exe or C:\Users\username\AppData\Local\Programs\Python\Python314\python.exe. If no path is returned, Python either isn’t installed or hasn’t been added to the system’s PATH environment variable.
Checking on Linux
Open a terminal (press Ctrl + Alt + T on most desktop distributions) and run:
bash
python3 –version
On modern Linux systems, python3 is the correct command — python alone often either does nothing or points to Python 2 on distributions that still carry it. A successful installation returns:
Python 3.14.5
To check if Python 2 is also present (legacy systems only):
bash
python2 –version
To find exactly where Python is installed on Linux:
bash
which python3
This returns the full path such as /usr/bin/python3, confirming both its presence and location. On Debian-based distributions including Ubuntu, the package manager can also confirm the installation:
bash
dpkg -l python3
Lines beginning with ii confirm the package is installed.
Checking on macOS
Open Terminal (Applications → Utilities → Terminal, or Spotlight search for Terminal) and run:
bash
python3 –version
macOS includes Python 3 from macOS 12.3 Monterey onward. On older Macs, python –version may return Python 2.7 — Apple’s legacy system Python that’s no longer updated. For development purposes, Python 3 via python3 –version is the relevant check.
To confirm the exact installation location on Mac:
bash
which python3
Common paths include /usr/bin/python3 (system Python) or /usr/local/bin/python3 (Homebrew-installed Python).
Checking pip Availability
Even when Python is installed, the package installer pip may need separate verification — particularly on minimal Linux installations where pip isn’t included by default:
Windows:
pip –version
Linux/macOS:
bash
pip3 –version
A successful response shows the pip version and the Python version it’s associated with — for example pip 24.1 from /usr/lib/python3/dist-packages/pip (python 3.14). If pip is absent on Linux, install it with sudo apt install python3-pip on Debian/Ubuntu systems.
Verifying Through the Python Interpreter
On any platform, simply typing python or python3 in the terminal without any flags launches the interactive Python interpreter if it’s installed. The prompt changes to >>> and the Python version appears in the welcome text:
Python 3.14.5 (main, May 10 2026, 09:12:31)
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
Type exit() to close the interpreter. This method simultaneously confirms Python is installed and shows the version — useful when command flags behave unexpectedly in certain shell environments.
FAQs
Q: What is the difference between python and python3 commands?
A: python may point to Python 2 on older systems or do nothing on modern ones. python3 explicitly calls the Python 3 interpreter. Always use python3 on Linux and Mac for reliable results.
Q: Python is installed but python –version gives an error on Windows. Why?
A: The PATH environment variable doesn’t include the Python installation directory. Reinstall Python and check “Add Python to PATH” during setup, or add the path manually through System Environment Variables.
Q: How do I check all Python versions installed on the same machine?
A: On Windows: py –list using the py launcher. On Linux: ls /usr/bin/python* lists all Python executables. On Mac with Homebrew: brew list | grep python.
Q: My Linux system shows Python is installed but scripts still fail. What should I check?
A: Check whether the script uses a shebang line pointing to the correct Python path (e.g., #!/usr/bin/env python3), and verify pip packages are installed for the correct Python version using pip3 list.
Q: Is Python pre-installed on Windows?
A: Not by default. Windows does not ship with Python pre-installed. It must be downloaded from python.org or installed via the Microsoft Store or a development tool package.