๐Ÿ“ Python

pip: Python Package Manager

P
Author
PyLand Team
๐Ÿ“…
Published
30.06.2026
โฑ๏ธ
Reading time
1 min
๐Ÿ‘๏ธ
Views
358
๐ŸŒฑ
Level
Beginner

Covered topics: Installing packages, Upgrading and removing, requirements.txt, Virtual environment.

Installing packages

pip install requests          # a specific package
pip install requests==2.31.0  # a specific version
pip install "requests>=2.28"  # minimum version
pip install -r requirements.txt  # from a file

Upgrading and removing

pip install --upgrade requests  # upgrade
pip uninstall requests          # remove
pip list                        # list installed packages
pip show requests               # package details

requirements.txt

# Save the current environment
pip freeze > requirements.txt

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

Contents of requirements.txt:

Django==5.0.1
djangorestframework==3.14.0
requests==2.31.0

Virtual environment

# Create
python -m venv venv

# Activate
source venv/bin/activate      # macOS/Linux
venv\Scripts\activate         # Windows

# Deactivate
deactivate

# Install packages into the environment
pip install django

pip vs Poetry vs uv

Tool Highlights
pip Standard, simple
poetry Lock file, dev/prod dependency separation
uv Extremely fast (written in Rust)

Searching for packages

pip search django  # deprecated, use pypi.org instead

Security

pip audit  # check for vulnerabilities
pip install pip-audit

Mirrors (if downloads are slow)

pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple

Your reaction to the article

๐Ÿ’ฌ Comments (0)

๐Ÿ” Sign in to leave a comment
๐Ÿšช Login
๐Ÿ’ญ

No comments yet

Be the first to share your opinion about this article!

๐Ÿ”— Similar

Similar articles

Continue learning with these materials

๐Ÿ“

if __name__ == "__main__": the Python entry point

The if name == "main" guard defines a Python program's entry point: it distinguishes direct...

๐Ÿ“… 14.08.2026 ๐Ÿ‘๏ธ 44
๐Ÿ“

strip() and lower(): Preparing User Text ๐Ÿงน

A user may enter the correct word with extra spaces or different letter case. Python...

๐Ÿ“… 11.08.2026 ๐Ÿ‘๏ธ 50
๐Ÿ“

ord(), chr(), and Cyclic Letter Shifts in Python ๐Ÿ”

A string contains characters, but a computer stores every character as a numeric code. Python...

๐Ÿ“… 09.08.2026 ๐Ÿ‘๏ธ 89

Did you like the article?

Subscribe to our updates and be the first to receive new articles. Grow with PyLand!