Last modified: Oct 02, 2026

How to Check If pip Is Installed and Its Version

pip is the package manager for Python. It helps you install and manage third-party libraries. Many beginners face problems because pip is missing or outdated. This guide shows you how to check if pip is installed and its version on any system.

What Is pip?

pip stands for "Pip Installs Packages". It is the standard tool for installing Python packages from the Python Package Index (PyPI).

With pip, you can install libraries like NumPy, Requests, or Django. You can also upgrade or remove them. Most modern Python versions include pip by default.

Still, pip may be missing. It may also be outdated. So checking it is a smart first step.

Why You Should Check pip

Checking pip helps you avoid common errors. For example, you may see "pip is not recognized" in your terminal. This means your system cannot find pip.

You may also get version conflicts. An old pip version can fail to install new packages. So knowing your pip version keeps your projects running smoothly.

It also helps when you follow tutorials. Many guides assume you have pip ready. Verifying it first saves time and frustration.

How to Check If pip Is Installed

You can check pip from your command line or terminal. The method is almost the same on Windows, macOS, and Linux.

Open your terminal. Then type one of these commands:


pip --version

If pip is installed, you will see output like this:


pip 23.2.1 from /usr/lib/python3/dist-packages/pip (python 3.11)

This line shows the pip version, its location, and the Python version it uses.

If pip is not installed, you will see an error. On Windows, it may say "pip is not recognized as an internal or external command". On macOS or Linux, it may say "command not found".

Using pip3 Instead of pip

On many systems, Python 2 and Python 3 are both installed. So pip may point to Python 2. To target Python 3, use pip3.

Run this command:


pip3 --version

You will get output like this:


pip 23.2.1 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)

If this works, pip3 is ready. If not, you need to install pip for Python 3.

Check pip Version with Python

You can also check pip through Python itself. This method is useful when the pip command is not in your PATH.

Use the python -m pip form. The -m flag runs a module as a script.


python -m pip --version

On some systems, you may need python3 instead:


python3 -m pip --version

The output looks the same as before. It confirms pip is installed and shows its version.

This approach is reliable. It uses the pip tied to your Python interpreter. So you avoid version mismatch problems.

Check pip Version Inside Python

You can also check pip from a Python shell. This is handy for quick checks.

Open Python by typing python in your terminal. Then run these lines:


# Import the pip module
import pip

# Print the installed pip version
print(pip.__version__)

The output will be just the version number:


23.2.1

This method works well on most systems. But newer pip versions may warn you. They prefer the command-line method.

How to Check pip Version on Windows

On Windows, open Command Prompt or PowerShell. Then type:


pip --version

If that fails, try:


py -m pip --version

The py launcher finds the right Python version on Windows. It is a common fix for PATH issues.

If pip is still missing, you can install it with:


py -m ensurepip --upgrade

This command installs or upgrades pip for your Python setup.

How to Check pip Version on macOS and Linux

On macOS and Linux, open your terminal. Then run:


pip3 --version

If that does not work, try:


python3 -m pip --version

On Linux, you may need to install pip first. Use your package manager, such as apt or dnf.


sudo apt install python3-pip

After installing, run the version check again. It should now work.

Common Errors and Fixes

Error 1: "pip is not recognized"

This means pip is not in your system PATH. Use python -m pip instead. Or add pip to your PATH.

Error 2: "No module named pip"

This means pip is not installed for that Python version. Run ensurepip to install it.


python -m ensurepip --upgrade

Error 3: Permission denied

This happens when you install packages system-wide. Use a virtual environment. Or add --user to your install command.

These fixes solve most pip problems. Always check your version after each fix.

Keep pip Updated

An old pip version can cause issues. So update it often. Run this command:


python -m pip install --upgrade pip

After the upgrade, check the version again. You should see a newer number.

Updating pip is quick and safe. It also gives you the latest features and bug fixes.

Quick Summary Table

Here is a simple list of the commands covered above:


pip --version          # Check pip version
pip3 --version         # Check pip3 version
python -m pip --version # Check pip via Python
py -m pip --version    # Windows launcher method
python -m ensurepip --upgrade # Install pip
python -m pip install --upgrade pip # Update pip

Bookmark these commands. You will use them often as a Python developer.

Conclusion

Checking if pip is installed and its version is a basic but vital skill. It takes only a few seconds. It also prevents many common errors.

Use pip --version or python -m pip --version to check quickly. If pip is missing, install it with ensurepip. If it is old, upgrade it with a single command.

Now you can manage your Python packages with confidence. Keep pip updated, and your projects will run smoothly.