Lesson 87 +10 XP

PIP and Packages

PIP is Python's package manager. It installs and manages extra modules from PyPI, the Python Package Index.

What is PIP?

  • PIP stands for "Pip Installs Packages".
  • It comes with Python on most systems.
  • PyPI hosts hundreds of thousands of free packages.

Check if PIP is installed


bash
pip - version

Install a package


bash
pip install camelcase

Use an installed package


python
import camelcase

c = camelcase.CamelCase()
txt = "hello world"
print(c.hump(txt))

### Hello World

List installed packages


bash
pip list

Remove a package


bash
pip uninstall camelcase

Show package info


bash
pip show camelcase

Popular packages

  • camelcase: capitalize text
  • numpy: fast math on arrays
  • pandas: data analysis
  • requests: HTTP requests
  • django and flask: web frameworks

Download with pip

Install packages from PyPI with a single command. That's how Python's ecosystem stays so rich.

TL;DR

  • PIP installs packages from PyPI.
  • pip install name and pip uninstall name.
  • pip list shows what's installed.
  • Packages like numpy and pandas power real Python work.