Repaso
EspaƱol
PythonFoundationsPY-68

What are pip and PyPI?

Options

  1. pip installs Python packages; PyPI is the online repository they come from (Correct option)
  2. pip is a text editor for Python files; PyPI is a kind of database
  3. pip runs the tests of a project; PyPI deploys the application
  4. pip is the Python interpreter; PyPI is the debugger that goes with it

Answer

pip installs Python packages; PyPI (Python Package Index) is the online repository where they come from

Why

pip is the tool you run to install, upgrade and remove packages. By default it downloads them from PyPI, the public index at pypi.org.

Example: python -m pip install requests.

A virtual environment (python -m venv .venv) keeps each project's packages separate, and pip freeze > requirements.txt records the list for others.

Remember

pip installs. PyPI is where packages live.

Key terms

Practice this question in Repaso