In this Python tutorial you will learn the basics of PIP. You will learn how to stay up-to-date, install packages, uninstall packages, and more.
PIP which is known as PIP Installs Python or PIP Installs Packages. Whatever you want to call it... We just call it PIP.
Note - There are some bash commands in this tutorial that may not work for you if you use Windows.
Let's get started.
Check the version you are using. If they are the same you can use either pip or pip3 as you wish.
If PIP needs upgrading then you can use the following command.
python -m pip install --upgrade pip
For help you can use the following command.
For the manual you can use this command.
List out all installed packages.
Use some bash commands to filter through your list.
pip list | grep "packagename"
List out more details about a specific package.
pip show packagename
Display a list of all packages along with version.
Output the list into a .txt file.
pip freeze > pip.txt
Output our new file to the console.
Install a PIP package
pip install packagename
Install a specific version of a PIP package
pip install packagename==1.0.0
Install multiple PIP packages from a .txt file
pip install -r pip.txt
Uninstall a package
pip uninstall packagename