Skip to content
pip — Explained with Examples

pip — Explained with Examples

DodaTech Updated Jun 15, 2026 2 min read

pip is the standard Python package installer, downloading packages from PyPI and managing dependencies declared in requirements.txt.

pip (Pip Installs Packages) is the default package manager for Python. It installs packages from the Python Package Index (PyPI) into the system or virtual environment site-packages. Dependencies are typically listed in requirements.txt or pyproject.toml. Pip works with virtual environments to isolate project dependencies.

Think of pip like a library catalog system. You request a book (package name), and the system retrieves it from the central library (PyPI) and places it on your shelf (site-packages). Your requirements.txt is like a reading list you hand to a friend so they can borrow the same books.

Pip supports version constraints (>=1.0,<2.0), editable installs for development (pip install -e .), and requirements files with comments. Modern Python projects increasingly use pyproject.toml with tools like Poetry or PDM.

# Install a package
pip install requests

# Install from requirements file
pip install -r requirements.txt

# Create and use a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install flask

# Freeze current packages to requirements
pip freeze > requirements.txt

Always use pip within a virtual environment to avoid conflicts between projects. For dependency resolution, newer versions of pip use a resolver that reports conflicts clearly.

npm, Package Manager, Bundling

Build Tools Index

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro