Open In App

Check Version of Installed Python Modules

Last Updated : 11 Sep, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

When working with Python, it’s important to know which package versions are installed. This helps avoid compatibility issues and makes debugging easier. Here are some simple ways to check package versions:

1. Using pip show command

The pip show command provides detailed information about specific package, including its version. To use this method, we need to follow these steps:

  • Open Terminal or command prompt.
  • Type the following command and hit enter.

pip show package_name

pip-show
pip show

2. Using __version__ attribute

Many python packages store their version number in '__version__' attribute. We can access this attribute to find the version of the installed package.

Follow this step:

  • Open the Python interpreter by typing python in the command prompt. Then import the package and use its __version__ attribute to print the installed version, like this:”

import pandas as pd
print(pd.__version__)

pandas-version
Pandas Version

3. Using pip list command

Using this method, we can get the versions of all the packages installed in current python working environment.

Follow these steps:

  • Open Terminal or command prompt
  • Type the following command and hit enter

pip list

gfg_pp_4
List of all the installed Python packages

Explore