Python Pip Basic Commands


What is Pip? pip is a tool for installing and managing Python packages.

With pip command you can install, list, upgrade (update), downgrade and uninstall Python packages.

In this post i am showing how to use pip from the command line by giving examples of the basic pip commands.

Pip List

List installed packages:

Show version of the particular package:

Search for a package:

List all available versions of a package:

Pip Install

Install the latest version of a package:

Install the specific version of a package:

Install packages from requirements.txt file:

Install local package:

Install local package in editable mode: The <DIRECTORY> must have a file in it.

Pip Upgrade

Upgrade a package to the latest version:

Upgrade/downgrade a package to the specific version:

Upgrade pip itself:

Upgrade/downgrade pip itself to the specific version:

Pip Uninstall

Uninstall a package:

Uninstall all packages: