Find Installed Python Package Version Using Pip
Last Updated :
29 Apr, 2025
When working with Python projects, it's important to know which versions of packages are installed in your environment. This helps ensure compatibility, manage dependencies, and troubleshoot issues effectively. Whether you're collaborating on a team, deploying an application, or simply maintaining your own codebase, being aware of the installed package versions is essential for a smooth development workflow. Let's understand the different method to do this efficiently.
Using pip show
The pip show command is one of the most straightforward ways to check the installed version of a package. It provides detailed information about the package, including the version number, location and dependencies.
- Open the terminal or command prompt.
- Type the following command and press Enter:
pip show package_name
Example: To check the version of emoji package, we would use:
pip show emoji
Output
pip show to check python package versionUsing import and __version__
If we are already in a Python environment, we can find out the version of a package by importing it and checking its __version__ attribute.
import emoji
print(emoji.__version__)
Output
Check Python Package VersionUsing Python -c Command
With -c flag we can run python code from the terminal.
python -c "import emoji; print('emoji:', emoji.__version__)"
Output
Python -c CommandUsing pip list
Another way to check the version of an installed package is by using the pip list command. This command lists all installed packages along with their versions.
pip list
Output
Scroll through the list to find the package name and its version number.
pip list to check python package versionUsing pip freeze
The pip freeze command is similar to pip list, but it formats the output in a way that's often used for creating requirements.txt files. It lists all installed packages with their exact versions.
pip freeze
Output
Find the package in the output to see its installed version.
pip freeze to check python package versionTo create a requirements.txt file with all installed packages and their versions, use the pip freeze command. The > symbol redirects the output to a file instead of showing it on the screen:
pip freeze > requriements.txt
Similar Reads
How to Find the Version of Installed NPM Package? Knowing the version of NPM installed on your system is important especially when working with specific versions of Node JS or when troubleshooting issues. This article provides instructions to check the version of NPM installed on your system.Prerequisites:Node JS Command Line InterfaceSteps To Find
1 min read
Get Application Version using Python Software versioning maybe thanks to reasoning the distinctive states of pc software package because it is developed and discharged. The version symbol is typically a word, a number, or both. For instance, version 1.0 is often accustomed to denote the initial unharness of a program. In this article,
2 min read
Check Version of Installed Python Modules In Python, it's important to keep track of the packages we're using. Knowing which version is installed can help avoid compatibility issues and make it easier to fix errors. This article discusses a few easy ways to check the version of any package in your Python environment. Let's explore them:Usin
2 min read
How To List Installed Python Packages Working on Python projects may require you to list the installed Python packages in order to manage dependencies, check for updates, or share project requirements with others. In this post, we'll look at numerous techniques for listing the Python packages that are installed on your system.List Insta
5 min read
Install Python package using Jupyter Notebook Jupyter Notebook is an open-source web application that is used to create and share documents that contain data in different formats which includes live code, equations, visualizations, and text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualiz
3 min read