How to Check Python Version – A Quick Guide

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:

cmd

Step 3:

In Command Prompt, type:

python --version

//OR

python -V

Example Output:

Python 3.12.1

That means Python 3.12.1 is installed on your system.

If That Doesn’t Work

Try:

py --version

On 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.6

How to Check Python Version on Linux

Open terminal and type:

python3 --version

If multiple versions exist:

which python

//or

which python3

This 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:

python

Step 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 Interpreter

You will see installed versions.

How to Check Python Version in Jupyter Notebook

Inside notebook cell:

!python --version
//OR
import sys
sys.version

Very 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.12
 
This also tells you which Python version pip is connected to.

What 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 --version

Bonus: How to Check Installed Python Packages

To see installed libraries:

pip list

To check specific package version:

pip show numpy

Best 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.

  • Related Posts

    How to Run a Python Script – A Beginner’s Guide

    How to Run a Python Script – A Beginner’s Guide If you’re learning Python, one of the first things you need to understand is how to run a Python script.…

    How to Make a Table in HTML: A Step-by-Step Guide

    How to Make a Table in HTML: A Step-by-Step Guide Tables in HTML are a powerful way to display data in rows and columns. This guide will walk you through…

    Read More

    How to Create Database in MySQL

    • By admin
    • November 27, 2021
    • 43 views
    How to Create Database in MySQL

    How to create table in MySQL

    • By admin
    • November 6, 2021
    • 39 views
    How to create table in MySQL

    MySQL commands with examples

    • By admin
    • September 11, 2021
    • 93 views
    MySQL commands with examples

    MySQL use database

    • By admin
    • May 28, 2021
    • 39 views
    MySQL use database

    System Software

    • By admin
    • May 20, 2021
    • 48 views

    Introduction to software

    • By admin
    • May 13, 2021
    • 43 views
    Introduction to software