How to Check Python Version – A Quick Guide
If you are learning Python programming, installing libraries like NumPy, Pandas, or Django, or working on a machine learning project, the first thing you should know is your Python version.
Different projects require different Python versions. Some packages work only on Python 3.8+, while older systems may still use Python 2.7.
In this quick guide, you will learn:
How to check Python version on Windows
How to check Python version on Mac
How to check Python version on Linux
How to check Python version inside VS Code
How to fix common version errors
Let’s start.
Why Checking Python Version is Important
Before installing packages using:
pip install package-name
You should verify your Python version because:
Some libraries do not support older versions
Python 2 is no longer supported
Virtual environments may use different versions
Deployment servers may require specific versions
How to Check Python Version on Windows
Method 1: Using Command Prompt
Step 1:
Press Windows + R
Step 2:
Type:
cmdStep 3:
In Command Prompt, type:
python --version
//OR
python -VExample Output:
Python 3.12.1
That means Python 3.12.1 is installed on your system.
If That Doesn’t Work
Try:
py --versionOn Windows, the py launcher is commonly used.
How to Check Python Version on Mac
Step 1:
Open Terminal
Step 2:
Type:
python3 --version
//Mac usually uses:
python --version
//for older versions.Example Output:
Python 3.11.6How to Check Python Version on Linux
Open terminal and type:
python3 --versionIf multiple versions exist:
which python
//or
which python3This shows the installation path.
How to Check Python Version Inside Python
You can also check Python version inside the interpreter.
Step 1:
Open terminal and type:
pythonStep 2:
Inside Python shell:
import sys
print(sys.version)
Output Example:
3.12.1 (main, Jan 10 2026, ...)
This method is useful in coding environments.
How to Check Python Version in VS Code
If you use VS Code:
Method 1:
Look at bottom-left corner → Python version is displayed.
Method 2:
Press:
Ctrl + Shift + P
//Search for:
Python: Select InterpreterYou will see installed versions.
How to Check Python Version in Jupyter Notebook
Inside notebook cell:
!python --version
//OR
import sys
sys.versionVery useful for data science learners.
How to Check Pip Version
Since pip is used to install packages, check it using:
pip --version
Example output:
pip 24.0 from Python 3.12What is the Latest Python Version in 2026?
As of 2026, Python 3.12 and 3.13 are commonly used.
You should always use the latest stable version unless your project requires an older version.
Common Errors and Fixes
Error 1: “Python is not recognized”
Solution:
Add Python to PATH during installation
Reinstall Python and check “Add Python to PATH”
Error 2: Multiple Python Versions Installed
Check all versions:
where python (Windows)
which python (Mac/Linux)
//Use specific version:
python3.11 --versionBonus: How to Check Installed Python Packages
To see installed libraries:
pip list
To check specific package version:
pip show numpyBest Practice for Developers
Use Python 3 (never Python 2)
Use virtual environments
Keep Python updated
Match Python version with production server
FAQ
How do I check Python version quickly?
Use:
python --version What is the difference between python and python3?
Some systems use python for older versions and python3 for modern Python 3 versions.
Why does my system show Python 2.7?
Older operating systems still include Python 2 by default. Install Python 3 manually.