For drone enthusiasts and developers working with flight technology, Python has become an indispensable tool. Its versatility, extensive libraries for data analysis, machine learning, and integration with hardware make it a prime choice for developing custom flight control systems, analyzing flight data, and even creating AI-driven autonomous flight behaviors. Before diving into these advanced applications, the foundational step is ensuring Python is properly installed on your Windows machine. This guide will walk you through the most reliable methods to verify your Python installation.
Verifying Python Installation via Command Prompt
The Command Prompt, or cmd, is a powerful utility within Windows that allows for direct interaction with your operating system’s commands. It’s the most straightforward and universally applicable method for checking if Python is installed and accessible.

Running the Python Command
The simplest way to check for a Python installation is to invoke the Python interpreter directly from the Command Prompt.
-
Open the Command Prompt: You can do this by searching for “cmd” in the Windows search bar and selecting “Command Prompt.” Alternatively, you can press
Windows Key + R, typecmd, and press Enter. -
Type the Python command: In the Command Prompt window, type the following command and press Enter:
python --version-
Expected Output (Python installed): If Python is installed and its directory is added to your system’s PATH environment variable, you will see the installed Python version printed, for example:
Python 3.9.7orPython 2.7.18. -
Expected Output (Python not installed or not in PATH): If Python is not installed, or if it is installed but its location is not recognized by the system’s PATH, you will likely receive an error message such as:
'python' is not recognized as an internal or external command, operable program or batch file.The system cannot find the file specified.
-
-
Alternative Python commands: Sometimes, especially if you have multiple Python versions installed or if the default
pythoncommand doesn’t point to the desired interpreter, you might need to try these variations:py --versionor
python3 --versionThe
pylauncher is a utility that comes with Python installations on Windows and is designed to help manage multiple Python versions. Ifpython --versionfails butpy --versionsucceeds, it indicates that the Python interpreter is present but might not be configured as the primarypythoncommand.
Accessing the Python Interpreter
Beyond checking the version, you can also attempt to launch the Python interpreter itself. This confirms that the interpreter is not only present but also executable.
-
Launch the interpreter: In the Command Prompt, type:
pythonor
py -
Expected Output (Python installed): If successful, you will be greeted by the Python interactive prompt, which looks like this:
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:37) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>The
>>>symbol indicates that the Python interpreter is ready to accept commands. You can then type Python code directly. For example,print("Hello, Drone Devs!")and press Enter. -
Exiting the interpreter: To exit the Python interpreter, type
exit()and press Enter, or pressCtrl + Zfollowed by Enter.
Understanding the PATH Environment Variable
The error messages you encounter when Python isn’t recognized are often related to the system’s PATH environment variable. The PATH is a list of directories that Windows searches through when you type a command. If the directory containing the Python executable (python.exe) is not in the PATH, Windows won’t be able to find it.
-
What to do if Python is installed but not found: If you know Python is installed (e.g., you can find
python.exein a folder likeC:Python39), you will need to add its directory to your PATH. This is a crucial step for seamless command-line interaction.- Search for “environment variables” in the Windows search bar and select “Edit the system environment variables.”
- In the System Properties window, click the “Environment Variables…” button.
- Under “System variables,” find the variable named
Pathand select it. - Click “Edit…”.
- Click “New” and add the path to your Python installation directory (e.g.,
C:Python39). You might also need to add theScriptssubdirectory (e.g.,C:Python39Scripts) as it contains useful tools likepip. - Click “OK” on all open windows to save the changes.
- Important: Close and reopen your Command Prompt for the changes to take effect. Then, try the
python --versioncommand again.
Checking Python Installation with the Python Launcher (py)
The Python launcher (py.exe) is a helpful tool that comes with Python installations on Windows. It simplifies the process of running Python scripts and managing multiple Python versions. Checking its functionality is another robust way to confirm Python’s presence.
Launching the Python Launcher
- Open the Command Prompt: As described previously.

-
Execute the launcher command: Type:
py --version -
Interpreting the results:
- Success: Similar to
python --version, a successful execution will display the default Python version. - Failure: If
pyis not recognized, it means either Python wasn’t installed with the launcher component, or the launcher itself is not in your PATH.
- Success: Similar to
Using the Python Launcher to Specify Versions
If you have multiple Python versions installed, the py launcher becomes particularly valuable. You can use it to explicitly run a specific version.
-
Listing installed Python versions: To see which Python installations the
pylauncher can detect, use:py -0pThis command will list the detected Python executables and their associated paths.
-
Running a specific version: You can then use the launcher to run a particular version. For instance, to run Python 3.8:
py -3.8 your_script.pyOr to open the interpreter for Python 3.8:
py -3.8
The ability to use py commands successfully implies a functional Python installation that is accessible via the command line.
Exploring Python Installation Locations Manually
Sometimes, the command line might be uncooperative, or you might want to visually confirm where Python is installed. Manually searching your file system can provide definitive proof.
Common Installation Directories
When you install Python from the official installer, it typically places the executables in a predictable location.
-
Default Installation Path: By default, Python installers often place versions in directories like:
C:PythonXX(whereXXis the version number, e.g.,C:Python39)C:Users<YourUsername>AppDataLocalProgramsPythonPythonXX
-
Using File Explorer:
- Open File Explorer.
- Navigate to
C:and look for aPythonXXfolder. - Alternatively, navigate to
C:Users<YourUsername>AppDataLocalProgramsPythonand check the subfolders. You may need to enable “Hidden items” in File Explorer’s “View” tab to see theAppDatafolder. - Inside the Python version folder (e.g.,
Python39), you should find thepython.exeexecutable file. - Also, look for a
Scriptssubfolder, which typically containspip.exeand other useful Python package management tools.
Verifying Executable Files
The presence of python.exe is the key indicator of an installation. If you find this file, it means the core Python interpreter is present.
- Double-clicking
python.exe: In some cases, double-clickingpython.exedirectly in File Explorer might launch the interactive interpreter. However, this is less reliable and often leads to the window closing immediately if there are no commands to execute, making command-line verification preferable.
Troubleshooting Common Issues
Encountering problems when checking for Python installation is common, especially for beginners. Understanding these issues can save you significant time.
“Not Recognized” Errors
As discussed, the most frequent error is 'python' is not recognized.... This almost always points to the PATH environment variable issue. Ensure the directory containing python.exe and its Scripts folder are correctly added to your system’s PATH.
Multiple Python Versions
If you have multiple Python versions installed (e.g., Python 2.7 and Python 3.9), the python command in the Command Prompt will typically point to the one that was installed last or configured as the default. This is where the py launcher becomes invaluable for managing and selecting specific versions.
- Ensuring the correct version is accessible: When installing Python, there’s usually a checkbox that says “Add Python X.X to PATH.” It’s highly recommended to check this box during installation. If you missed it, you’ll have to manually edit the environment variables.

Administrator Privileges
For most Python installations and command-line operations, administrator privileges are not required. However, if you encounter permission errors when trying to install Python or add it to the PATH, try running the Command Prompt or the Python installer “as administrator.”
By systematically employing these methods, you can confidently determine if Python is installed on your Windows system, laying the groundwork for your next drone development project or flight data analysis endeavor.
