Python PIP Tutorial for Beginners
In this Python tutorial, you will learn the basics of PIP. 'PIP Installs Python' or 'PIP Installs Packages' is a package management solution for Python. In this tutorial, you will learn how to stay up-to-date, install, uninstall, and more.
Note: Some bash commands in this tutorial may not work if you use Windows. Tutorial
Check the PIP version you are using.
If they are the same you can use either pip or pip3 as you wish.
Upgrade PIP from the command line
If PIP needs upgrading then you can use the following command.
python -m pip install --upgrade pip
Get PIP help on the command line
For help you can use the following command.
How to view the PIP manual
For the manual you can use this command.
List all installed PIP packages in your working environment
List out all installed packages.
Using bash commands with PIP to search packages
Use some bash commands to filter through your list.
pip list | grep "packagename"
List specific PIP package details in the terminal
List out more details about a specific package.
pip show packagename
Display all your PIP packages with version information
Display a list of all packages along with version.
Pipe your PIP packages into a .txt file
Output the list into a .txt file.
pip freeze > pip.txt
How to install a PIP package
Start the installation of a PIP package
pip install packagename
Install a specific version of a PIP package
How to install a specific version of a PIP package
pip install packagename==1.0.0
Install PIP packages from a file recursively
Install multiple PIP packages from a .txt file
pip install -r pip.txt
How to uninstall a PIP package
Uninstall a package from the command line
pip uninstall packagename