Tsallaka zuwa abun ciki
Justice Tech School

Packages and pip

pip installs packages from the Python Package Index (PyPI). Run pip install name in a terminal, pip list to see what is installed and pip uninstall name to remove it. A requirements.txt file lists the packages a project needs so others can install them with pip install -r requirements.txt.

Example
pip install requests
pip list
pip freeze > requirements.txt
pip install -r requirements.txt

Exercise

Which command installs a package?

pip  requests

Quiz Test

Where does pip download packages from by default?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.