Python is a trendy programming language that comes with tons of libraries and modules. To install these libraries, you can install them using their wheel file or use any library manager.
PIP is a python library that stands for Pip Install Packages or Preferred Installer Program that helps you install, remove, and upgrade all other libraries without reinventing wheel files every time when you install new packages.
Today, we guide you on using PIP to install, reinstall, remove, and manage all other libraries with this single library.
Install new package
To install a new python library into your system, you can easily install it using PIP. You can easily get almost all python packages from PyPI.
$ pip install [PACKAGE-NAME]
Install a specific version of a package
If you want to install a specific package of any python library. For that use the following command with the specific version number.
pip install [PACKAGE-NAME]==1.0.0
Search Particular Package from PyPI
There are thousands of packages in python. If you want to search for any particular package in python, you can easily search it using the package name’s.
$ pip search [PACKAGE-NAME]
Output Detail of Python Package
To get complete details of the installed package in python. Example package name, version, author, or all other required packages in python. You can use the following command with the package name.
$ pip show [PACKAGE-NAME]
List all Installed Package
You can easily list down all installed python packages using the following command.
$ pip list
List all Outdated Python Package
Get the list of all python packages left to update using the following command.
$ pip list --outdated
Upgrade Python Package
After getting all outdated python packages, you can easily upgrade them using the following command with the package name.
$ pip install [PACKAGE-NAME] --upgrade
Reinstall Python Package
Make sure when you reinstall the python package the older version of that package will be removed and the new version will be installed.
$ pip install [PACKAGE-NAME] --upgrade --force-reinstall
Remove Python Package
You can easily remove the python package using the following command with the package name.
$ pip remove [PACKAGE-NAME]
Looking for Python Developer Jobs? Find your best job on Jooble.
Create Requirement File of Package
The requirement file is an important list of files containing all installed python libraries in your system. This file is shared with others if you share any project with others and don’t want to install them manually.
$ pip freeze > requirements.txt
If you have more things to add let us know in the comment section to add it in the future.
Innovative tech mind with 10 years of experience working as a computer programmer, web developer, and security researcher. Capable of working with a variety of technology and software solutions, and managing databases.