GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Python Tutorial
  • Data Types
  • Interview Questions
  • Examples
  • Quizzes
  • DSA Python
  • Data Science
  • NumPy
  • Pandas
  • Practice
  • Django
  • Flask
  • Python Packages
  • Introduction1 min read

This view

  • Original page
  • New address

GeezerVison is showing www.geeksforgeeks.org — Python PIP - GeeksforGeeks

geeksforgeeks
search icon
  • Courses
  • Tutorials
  • Interview Prep
  • Python Tutorial
  • Data Types
  • Interview Questions
  • Examples
  • Quizzes
  • DSA Python
  • Data Science
  • NumPy
  • Pandas
  • Practice
  • Django
  • Flask

Python PIP

Last Updated : 5 Jun, 2026

Python PIP is the package manager used to install, update and manage Python packages and libraries. It allows users to easily download packages from the Python Package Index (PyPI) directly through the command line. PIP is commonly used to add external libraries that are not included with Python by default.

The basic syntax of a PIP command is:

pip <command>

Check PIP Version

Use the following command in the terminal or command prompt to check whether PIP is installed:

pip --version

Screenshot-2026-06-01-170150
Checking PIP Version

This command displays the installed version of PIP.

If PIP is not installed on your system, refer to this article Python pip Installation.

Installing Packages

PIP provides the install command to download and install Python packages from PyPI. For example, the following command installs the NumPy package. Below is the syntax:

pip install package_name

For Example:

pip install numpy

Output When Package is Not Installed

Using PIP to install a new package
Using Python PIP to install a new package

Output When Package is Already Installed

Using Python PIP to install an existing package
Using Python PIP to install an existing package

Install Specific Package Version

You can install a specific version of a package using the == operator with the package name. Below is the syntax:

pip install package_name==version

Example:

pip install numpy==1.26.4

Screenshot-2026-06-01-170601
Install Specific Package Version

This command installs version 1.26.4 of the NumPy package.

Viewing Package Information

The pip show command is used to display details about an installed package such as version, location and dependencies. Below is the syntax:

pip show package_name

Example: 

pip show numpy

Screenshot-2026-06-01-170413
Viewing Package Information

Listing Installed Packages

The pip list command is used to display all packages installed in the current Python environment. Below is the syntax:

pip list

Example: 

Screenshot-2026-06-01-170750
Listing Installed Packages

Uninstalling Packages

The pip uninstall command is used to remove an installed package from the system. Below is the syntax:

pip uninstall package_name

Example: 

pip uninstall numpy

dd
Uninstalling Packages

Note: This command removes only the selected package. Dependencies installed separately are not removed automatically.

Using Requirements File

A requirements.txt file is used to install multiple packages at once. Below is the requirements.txt:

Screenshot-2026-06-01-171217
requirements.txt

Syntax: 

pip install -r requirements.txt

Example: 

ee
Using Requirements File

Listing Installed Packages

The pip freeze command displays installed packages along with their versions. Below is the syntax:

pip freeze

Example: 

Screenshot-2026-06-01-171721
Listing Installed Packages

Listing Outdated Packages

The pip list --outdated command shows packages that have newer versions available. Below is the syntax:

pip list --outdated

Example:

Screenshot-2026-06-01-171929
Listing Outdated Packages

Upgrading Packages

The pip install --upgrade command updates a package to the latest version. Below is the syntax:

pip install --upgrade package_name

Example:

pip install --upgrade numpy

ff
Upgrading Packages

We can also upgrade any package to a specific version using the below command.

pip install --upgrade numpy==2.0.0

gg
Upgrading to a Specific Version

Downgrading Packages

You can install an older version of a package by specifying the required version. Below is the syntax:

pip install package_name==version

Example:

pip install numpy==1.26.4

Screenshot-2026-06-01-172425
Downgrading Packages

Related Articles:

  • Python
  • Python Packages
Comment

Explore

    Python Fundamentals
    • Introduction1 min read
    • Input & Output2 min read
    • Variables4 min read
    • Operators4 min read
    • Keywords2 min read
    • Data Types4 min read
    • Conditional Statements3 min read
    • Loops3 min read
    • Functions4 min read
    Python Data Structures
    • String4 min read
    • List3 min read
    • Tuples3 min read
    • Dictionary3 min read
    • Set2 min read
    • Arrays5 min read
    Advanced Python
    • OOP Concepts3 min read
    • Exception Handling5 min read
    • File Handling4 min read
    • Python Database2 min read
    • MongoDB3 min read
    • MySQL7 min read
    • Packages4 min read
    • Modules3 min read
    • DSA Libraries5 min read
    • Python GUI2 min read
    Data Science with Python
    • Numpy3 min read
    • Pandas4 min read
    • Matplotlib3 min read
    • Seaborn3 min read
    • StatsModel2 min read
    • Model Building6 min read
    • TensorFlow2 min read
    • PyTorch5 min read
    Web Development with Python
    • Flask3 min read
    • Django5 min read
    • Django ORM4 min read
    • Jinja2 Templating5 min read
    • Django Templates5 min read
    • REST API3 min read
    • Build API with DRF4 min read
    Python Practice
    • Quiz1 min read
    • Practice Problems2 min read
    • Interview Q & A15+ min read
    Courses
    • Placement 360 Course2 min read
    • Data Science 360 Course2 min read
    • AI Engg Course2 min read
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.