Skip to main content
While Python’s built-in standard library is incredibly powerful, the real superpower of Python is its massive ecosystem of third-party libraries. These are packages written by the open-source community to solve almost any programming task imaginable.

What is PyPI?

PyPI (pronounced pie-pee-eye), or the Python Package Index, is the official online repository for third-party Python software.
  • Anyone can write a Python package and publish it to PyPI.
  • When you need a package (like pandas or requests), you download it directly from PyPI.
  • Browse packages at https://pypi.org.

What is pip?

pip is the standard package manager for Python. It comes pre-installed with modern Python installations and allows you to install and manage packages directly from PyPI.

requests Module

The requests module is a popular third-party Python library used to send HTTP requests and communicate with REST APIs. Install it using:

Common pip Commands

Important: Activate your virtual environment before installing packages to avoid installing them globally.Learn more about Virtual Environments.

What is uv?

uv is a modern, ultra-fast Python package manager written in Rust. It is designed as a replacement for pip, pip-tools, and virtualenv.

Why use uv?

  • 🚀 10–100× faster than pip
  • 📦 Manages virtual environments
  • 🐍 Can install Python interpreters
  • ⚡ Uses aggressive dependency caching

Common uv Commands

Sharing Dependencies (requirements.txt)

Instead of sharing your .venv folder, share a requirements.txt file containing your project’s dependencies.

Generate the file

Example:

Install dependencies

Using External Packages

Common Mistakes

Python cannot find the package.Common causes
  1. The package is not installed.
  2. The virtual environment is not activated.
  3. VS Code is using a different Python interpreter.
Don’t name your script the same as a package.Example: requests.pyPython will import your file instead of the real requests package.

Practice & Exercises

Follow-Along Practice

Practice installing packages, importing modules, and working with the requests library.💻 VS Code | 🚀 Colab | 📥 Download

Practice Exercises

Solve exercises on package installation, imports, and API requests.💻 VS Code | 🚀 Colab | 📥 Download

What’s Next?

Working with APIs

Connect to online services using the requests library.