π₯
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 pandasCommon 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.txtTry 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.
