How to Verify Python Installation
After installing Python on your computer, it is very important to verify that it has been installed correctly. Even if the installation is completed successfully, there are times when the Python command may not work or the PATH may not be configured properly.
In this lesson, we will learn how to verify that Python has been installed correctly, step by step.
Why Should You Verify Python Installation?
By verifying Python after installation, you can:
Confirm that Python has been installed successfully.
Check the installed Python version.
Verify that the Python PATH has been configured correctly.
Confirm that Python can be accessed from Command Prompt or PowerShell.
Detect potential installation issues before starting development.
Step 1 – Open Command Prompt or PowerShell
First, press the Windows key.
Then search for and open either:
Command Prompt
or PowerShell
Python commands work the same way in both applications.
Step 2 – Check the Python Version
In Command Prompt or PowerShell, type the following command:
python --version
Or:
python -V
If everything is installed correctly, you will see an output similar to:
Python 3.13.x
This indicates that Python has been installed successfully on your computer.
Step 3 – Open the Python Interpreter
To start the Python Interactive Interpreter, type the following command:
python
After pressing Enter, you will see the following prompt:
>>>
This indicates that the Python Interpreter is running successfully.
Step 4 – Run a Simple Program
Inside the Interpreter, type the following code:
print("Hello, World!")
After pressing Enter, you will see the following output:
Hello, World!
This confirms that Python programs are being executed correctly.
Step 5 – Exit Interactive Mode
To exit the Python Interpreter, type:
exit()
and press Enter.
Alternatively, you can press Ctrl + Z, followed by Enter.
You will then return to Command Prompt or PowerShell.
Step 6 – Check Whether pip Is Installed
One of the most important tools that comes with Python is pip.
pip stands for Python Package Installer or Package Manager.
A standard Python installation includes only the built-in modules. However, when developing real-world projects, you will need many additional libraries and frameworks.
The tool that helps you download and install these packages is pip.
For example, you can use pip to install:
Pandas for Data Analysis
NumPy for Numerical Computing
Matplotlib for Data Visualization
Scikit-learn for Machine Learning
TensorFlow for Artificial Intelligence projects
FastAPI for building Web APIs
Django for developing Web Applications
SciPy for Scientific Computing
There are thousands of Python packages available, and pip is the tool used to install and manage them.
To understand it more easily:
Think of Python as an empty house.
Think of pip as the service that brings furniture, appliances, and everything else needed to make the house useful.
Whenever you need a new package, pip downloads, installs, updates, and removes it for you.
For example, to install FastAPI:
pip install fastapi
To install NumPy:
pip install numpy
To install Pandas:
pip install pandas
Verify That pip Is Installed
To check whether pip has been installed correctly, run the following command:
pip --version
If everything is working correctly, you will see output similar to:
pip 25.x from ...
This confirms that pip has also been installed successfully.
What If the Python Command Does Not Work?
If the python --version command does not work, one of the following may be the reason:
Python was not installed correctly.
The Add Python to PATH option was not selected during installation.
Command Prompt was opened before the installation was completed.
The PATH environment variable has not been updated.
In this case:
Close and reopen Command Prompt.
Restart your computer and try again.
Reinstall Python if necessary.
Make sure to select Add Python to PATH during the installation.
Verify Both Python and pip
You can verify both Python and pip by running the following commands:
python --version
pip --version
If both commands return the correct output, your Python Development Environment has been set up successfully.
What Can You Do After Verification?
After verifying your Python installation, you can:
Install Visual Studio Code.
Install the Python Extension.
Create Virtual Environments.
Install packages using pip.
Build FastAPI projects.
Use frameworks such as Django or Flask.
Install Data Science and Machine Learning libraries.
Conclusion
Verifying your Python installation is a very important step. By using commands such as python --version, python, and pip --version, you can easily confirm that both Python and pip have been installed correctly.
Although Python is a programming language, its real power comes from the thousands of packages and libraries available for it. The tool that allows you to easily install and manage these packages is pip. Therefore, in addition to verifying Python, every Python developer should also make sure that pip is installed and working correctly before starting development.