Python is one of the most widely used programming languages for web development, automation, data work, and AI projects. Before installing packages or running a project, you should know which Python version is installed.
The easiest How to Check Python Version method is to open your terminal or Command Prompt and run python –version. On some systems, you may need python3 –version. This guide covers Windows, macOS, Linux, VS Code, PyCharm, pip, and common version errors.
How to Check Python Version

The quickest way to Check Python Version is through your computer’s command line.
Open Command Prompt on Windows or Terminal on macOS and Linux. Then enter:
python –version
You may see an output like:
Python 3.12.4
You can also use:
python -V
Both commands normally show the installed Python interpreter version.
If python does not work, try:
python3 –version
This is common on macOS and Linux systems.
For example:
$ python3 –version
Python 3.12.4
The number after Python is the installed version. In this example, the computer is using Python 3.12.4.
Which Python version command should you use?
There is no single command that works identically on every computer.
| System or situation | Command |
| Windows | python –version |
| Windows alternative | py –version |
| macOS | python3 –version |
| Linux | python3 –version |
| Python interpreter | import sys |
| pip connection | python -m pip –version |
If you are a beginner, start with python –version. If that fails, try python3 –version or py –version on Windows.
Read More: How Long Does it Take to Learn Python?
How to Check Python Version on Windows

Windows users have several simple ways to check their Python installation.
Check Python Version Using Command Prompt
Press the Windows key and search for Command Prompt. Open it and enter:
python –version
You should get an output similar to:
Python 3.13.1
You can also run:
python -V
If Python is installed and available through PATH, both commands should return the version.
Use the Python Launcher on Windows
Windows may also provide the Python launcher. Try:
py –version
For a more detailed list of installed Python versions, you can use:
py –list
This can be useful when several Python versions are installed.
For example, a computer might contain Python 3.11 and Python 3.13. Knowing this helps you avoid running a project with the wrong interpreter.
Why Windows May Show a Different Version
A common beginner issue happens when more than one Python installation exists.
For example, python –version may show Python 3.11, while a project requires Python 3.12. The problem may not be that Python is missing. Your system may simply be using another installation. That is why checking the active Python path can be helpful.
How to Check Python Version on macOS and Linux
On macOS and Linux, python3 is commonly used.
Open Terminal and enter:
python3 –version
The output may look like:
Python 3.12.3
You can also try:
python3 -V
If python works on your system, you can check it with:
python –version
Do not assume that python and python3 point to the same installation. They can refer to different interpreters.For development work, it is useful to check the exact command your project uses.
How to Check Python Version Inside Python

You can check the version from within a Python program.
Start Python by entering:
python
Then run:
import sys
print(sys.version)
You may get output similar to:
3.12.4 (main, …)
This gives more information than the basic version command.
If you only want the version number, use:
import sys
print(sys.version_info)
You can also access individual parts:
import sys
print(sys.version_info.major)
print(sys.version_info.minor)
print(sys.version_info.micro)
For Python 3.12.4, the values are:
- Major: 3
- Minor: 12
- Patch: 4
This method is useful when your program needs to check the Python environment before running.
For example:
import sys
if sys.version_info >= (3, 12):
print(“Python version is supported.”)
else:
print(“Please use Python 3.12 or newer.”)
This is more useful than simply looking at the version because the program can make a decision based on it.
How to Check Python Version in PyCharm
PyCharm projects can use a different Python interpreter from the one configured for your computer. This means your system may show Python 3.13, while a PyCharm project uses Python 3.11. To check the version, open your project in PyCharm and find the configured Python interpreter in the project’s settings. You can also open the PyCharm terminal and run:
python –version
If the project uses python3, run:
python3 –version
The important point is to check the interpreter connected to your project. This matters because Python packages are installed into an environment. If your terminal uses one Python installation and PyCharm uses another, packages may appear to be missing even though you installed them.
How to Check Python Version Using pip
Many beginners confuse the Python version with the pip version.
You can check pip with:
pip –version
You might see:
pip 24.x from … (python 3.12)
This output can help show which Python installation pip is connected to.
An even safer approach is:
python -m pip –versio
This tells Python to run the pip module associated with that Python interpreter.
You can also use:
python3 -m pip –version
on systems where Python 3 is called python3.
This is useful when you have multiple Python versions installed.
How to Check Which Python Version Is Being Used
Knowing the installed version is useful, but sometimes you need to know which Python executable is running.
On Windows, use:
where python
You can also use:
where py
On macOS and Linux, use:
which python3
For example:
/usr/bin/python3
The path shows the location of the executable. This helps diagnose problems where your computer has multiple Python installations.
You can also check the executable from Python itself:
import sys
print(sys.executable)
This returns the exact Python executable used by the running program. That makes it a useful check when working with VS Code, PyCharm, virtual environments, or multiple installations.
What Does a Python Version Number Mean?
A Python version such as 3.12.4 contains three important parts.
Major version
The first number is the major version:
3
Python 3 is the modern Python family used for current development.
Minor version
The second number is the minor version:
12
So Python 3.12 belongs to the Python 3 family and the 12th minor release line.
Patch version
The final number is the patch version:
4
So:
Python 3.12.4
means major version 3, minor version 12, and patch version 4. Version numbers matter because software packages can have compatibility requirements. A project may support one Python release but not another. Always check a project’s documentation or requirements before changing your Python installation.
What to Do If Python Version Command Does Not Work
If python –version returns an error, do not immediately reinstall everything.
First try:
python3 –version
On Windows, also try:
py –version
If none of these work, Python may not be installed or its executable may not be available through your system PATH. You can also check whether the system can find Python:
Windows:
where python
macOS/Linux:
which python3
If these commands return nothing useful, check your Python installation and PATH settings.
What if Python is installed but the command still fails?
This usually means the terminal cannot find the Python executable. Close and reopen your terminal after installing Python. If the problem continues, check whether Python was added to PATH during installation.
If you are learning Python and keep running into setup problems, building the basics in a structured environment can save time. Python Courses For ai beginners can help new learners understand installation, commands, variables, packages, and practical coding tasks step by step.
At LocalPro1 Institute, beginners can also focus on practical Python skills instead of learning commands without understanding how they are used.
Python Version vs pip Version: What Is the Difference?
Python and pip have different jobs.
Python is the programming language and interpreter used to run Python programs.
pip is a package management tool used to install Python packages.
For example:
python –version
checks the Python interpreter.
While:
pip –version
checks pip.
You can think of it this way:
| Tool | Main purpose |
| Python | Runs Python code |
| pip | Installs Python packages |
| Python version | Identifies the Python interpreter release |
| pip version | Identifies the installed pip release |
You may have Python 3.12 installed with a particular pip version. If you want to make sure pip belongs to the Python interpreter you are using, run:
python -m pip –version
This is often clearer than running pip –version alone.
A Simple Real-World Example
Suppose you download a Python project and its instructions say it requires Python 3.11 or newer.
Start by checking:
python –version
If your computer returns:
Python 3.10.8
Your installed version is below the project’s stated requirement.
If python3 –version returns:
Python 3.12.4
you may already have a suitable Python installation.
You should then check which executable is being used:
python3 -c “import sys; print(sys.executable)”
This small check can prevent confusion when multiple versions are installed.
Why Checking Python Version Matters
Checking the Python version is not only a beginner task.
Developers check it when:
- Installing Python packages
- Setting up a new project
- Creating virtual environments
- Following coding tutorials
- Running older applications
- Troubleshooting package errors
- Using VS Code or PyCharm
- Working with AI and data tools
- Moving a project to another computer
A package may require a particular Python release. A project may also have its own supported version range. That is why checking the interpreter before troubleshooting can save time.
Conclusion
The easiest way to How to Check Python Version is to open Command Prompt or Terminal and run python –version. If that does not work, try python3 –version or py –version on Windows. For deeper checks, use sys.version, sys.executable, where python, or which python3. These commands help you identify both the version and the exact Python installation being used.
Remember that pip has its own version. Use python -m pip –version when you want to confirm which Python installation is connected to pip. If you are learning Python, understanding these basic commands gives you a better start before working with packages, projects, and development tools. For practical Python training and guidance, contact LocalPro1 Institute today and start building your Python skills with real-world practice.
FAQs
How do I check my Python version?
Run python –version in Command Prompt or Terminal. If it does not work, try python3 –version.
How do I check Python version in CMD?
Open Windows Command Prompt and run python –version. You can also try py –version if the Python command is unavailable.
How do I check Python version on Mac?
Open Terminal and run python3 –version. The command will display your installed Python 3 version.
How do I check Python version in Linux?
Open Terminal and run python3 –version. You can also use which python3 to find the executable location.
How do I check py version?
If you mean the Python version on Windows, run py –version. The Python launcher can also help when multiple Python versions are installed.
How do I check pip version?
Run pip –version. For a more direct connection to your Python interpreter, use python -m pip –version.
Can I have multiple Python versions installed?
Yes. You can have multiple Python versions on one computer. You should check which interpreter your project, IDE, or terminal is using.
How can I check which Python executable is running?
Inside Python, run import sys followed by print(sys.executable). This displays the path of the active Python executable.
Why does Python version matter?
Python versions can affect package compatibility and project requirements. Checking your version helps you choose the correct environment before installing packages or running code