📦

Pip (aide-mémoire)

📦
What Is Pip? A Guide for New Pythonistas
📦
Pipenv: A Guide to the New Python Packaging Tool

Get the version of pip

pip --version

How to tell pip to run the module as an executable

python -m pip install --upgrade pip

Install a package

pip install <package>

Look at the package metadata

pip show <package>

List all the packages

pip list

Requirement

Save the requirements to requirements.txt

pip freeze > requirements.txt
cat requirements.txt

If more stable/recent version is accepted (>=)

certifi>=2018.11.29, <2020.1.1

Install from a requirements.txt

pip install -r requirements.txt

If you want to update

pip install --upgrade -r requirements.txt

Uninstall all the requirements file

pip uninstall -r requirements.txt -y

Search in the database

pip search <package>

Uninstall a package

pip uninstall <package>

Force

pip uninstall <package> -y