All lessons
πŸ“₯

Python PIP

Install packages from PyPI

Reward
+30 XP

What is PIP?

PIP is Python's package manager. It installs libraries from the Python Package Index (PyPI).

# Run in terminal (not in Python):
# pip install requests
# pip install numpy pandas

Common commands

pip install, pip uninstall, pip list, pip freeze, pip show.

# pip install requests     β€” install a package
# pip uninstall requests   β€” remove it
# pip list                 β€” show installed
# pip freeze > requirements.txt

Try it yourself

Run the example below. Edit it and see what changes.

main.py
Output
Press Run to execute (Ctrl/Cmd+Enter)

Common mistakes

  • ⚠Running pip install inside a Python script instead of the terminal.
  • ⚠Not using virtual environments β€” packages install globally.