In this article, we will show you how to upgrade PIP to the latest version. We will also show you how to search for available Python packages in the PyPi package repository and how to install a Python package, install specific versions of a Python package, and upgrade the existing Python packages with PIP as well. Finally, we will show you how to list all the installed Python packages, see the information on specific Python packages, and uninstall the Python packages with PIP.
Topic of Contents:
- How to Check the Installed PIP Version
- How to Upgrade PIP to the Latest Version
- How to Search for Available Python Packages with PIP
- How to Install a Python Package with PIP
- How to See the Information on Installed Python Packages with PIP
- How to Install Specific Versions of a Python Package with PIP
- How to Upgrade the Installed Python Packages with PIP
- How to List the Installed Python Packages with PIP
- How to Uninstall the Python Packages with PIP
- Conclusion
How to Check the Installed PIP Version
To check the version of Python PIP that is installed on your computer, run the following command:
PIP version 22.0.2 is installed on our computer as you can see in the following screenshot. You may have a different version of PIP installed on your computer.
How to Upgrade PIP to the Latest Version
It’s a good idea to always keep Python PIP up to date. It’s very easy to upgrade PIP to the latest version.
To upgrade PIP to the latest version, run the following command:
A newer version of PIP is being downloaded and installed. It takes a few seconds to complete.
At this point, PIP should be installed.
As you can see, Python PIP is upgraded to the latest version.
How to Search for Available Python Packages with PIP
To search for available Python PIP packages, open a web browser and visit the official PyPi package repository.
Once the page loads, type in your search term in the “Search projects” section and press <Enter>.
We searched with the flask[1] keyword and the matched Python packages are listed[2].
Click on the Python package that you’re interested in to see more information.
A description of the selected Python package should be displayed[1]. You can read the “Project description” to find out what this package does and what you can use it for. You will also find the installation instructions for the selected Python package at the top of the page[2].
In the “Release history” section, you will find all the versions of that Python package that were released. You can install any one of the versions of the Python package that you want. We covered it in the How to Install Specific Versions of a Python Package with PIP section of this article.
How to Install a Python Package with PIP
To install a Flask Python package (let’s say) from the PyPi package repository, run the following command:
The Flask Python package is being installed. It takes a few seconds to complete.
At this point, the Flask Python package alongside the required dependencies should be installed.
How to See the Information on Installed Python Packages with PIP
To see the information on an installed Python package which is Flask (let’s say), run the following command:
The following information on the installed Python package should be printed:
Name: The name of the Python package.
Version: The version of the installed Python package.
Summary: A short description of what this package is for.
Home-page: The URL of the official website of the Python package.
Author: The name of the author of the Python package.
Author-email: The email address of the author of the Python package.
License: The license that the Python package is using.
Location: The path where the Python package is installed locally on your computer.
Requires: The list of packages that this Python package depends on.
Required-by: The list of packages that depend on this package to work.
How to Install Specific Versions of a Python Package with PIP
To install a specific version (2.1.0 let’s say) of the Flask Python package (let’s say), run the following command:
The Flask version 2.1.0 is being downloaded and installed. It takes a few seconds to complete.
At this point, Flask 2.1.0 should be installed.
As you can see, the Flask Python package version 2.1.0 is installed.
How to Upgrade the Installed Python Packages with PIP
To check whether an up-to-date version of a Python package is available and to install the latest available version of the Flask Python package (let’s say), run the following command:
The Flask Python package should be upgraded to the latest version.
As you can see, the Flask Python package is upgraded from version 2.1.0 to 2.3.2.
How to List the Installed Python Packages with PIP
To list all the installed Python packages, run the following command:
A list of all the installed Python packages and the version number should be listed as you can see in the following screenshot:
How to Uninstall the Python Packages with PIP
To uninstall a Flask Python package (let’s say), run the following command:
To confirm the uninstallation action, press Y and then press <Enter>.
The Flask Python package should be uninstalled.
Conclusion
We showed you how to upgrade PIP to the latest version. We also showed you how to search for available Python packages in the PyPi package repository and how to install a Python package, install specific versions of a Python package, and upgrade the existing Python packages with PIP as well. Finally, we showed you how to list all the installed Python packages, see the information on specific Python packages, and uninstall the Python packages with PIP.