Introduction
In this article, we will be talking about the six most important pip commands that every Python developer should know. Here is what we will be covering in this article.
- What is a pip?
- pip search
- pip install
- pip show
- pip uninstall
- pip list
- pip freeze
What is a pip search?
Pip is a package manager for Python packages. When we install pip, it is added to the system as a command-line program that can be run from the command line. We not only use PIP to install and uninstall Python packages, but it is also a great tool to create a Python virtual environment. And in this article, we will be talking about different useful commands that a Python developer uses in a day to day life.
Here is an example.

pip install
You can install a package using the "pip install <package>" command. You may already know the package name or you can search for a package using the "pip search <package>" command. By default, a package is installed from PyPI. Below is a screenshot of installing Flask.

PIP installation has several stages
- Identify the base requirements. The user-supplied arguments are processed here.
- Resolve dependencies. What will be installed is determined here.
- Build wheels. All the dependencies that can be, are built into wheels.
- Install the packages (and uninstall anything being upgraded/replaced).
There is also a concept called caching. PIP provides a cache that functions similarly to that of a web browser and it is on by default. We can disable the cache and always access the PyPI using the --no-cache-dir option as,
quickdev/~$ pip install --no-cache-dir flask
quickdev/~$
As per PyPA documentation,
When making an HTTP request, pip will first check its local cache to determine if it has a suitable response stored for that request that has not expired. If it does then it simply returns that response and doesn’t make the request.
If it has a response stored, but it has expired, then it will attempt to make a conditional request to refresh the cache which will either return an empty response telling pip to simply use the cached item (and refresh the expiration timer) or it will return a whole new response which pip can then store in the cache.
Using PIP, we can also install packages from a requirements file, which we will cover later in the article.







Join the conversation! Your thoughts help the community grow.