📝 Python

pip: Python Package Manager

P
Author
Pyland
📅
Published
30.06.2026
⏱️
Reading time
1 min
👁️
Views
119
🌱
Level
Beginner

Охватываемые темы: 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

📝

Event Loop in Python: How asyncio Achieves "Paral…

Event loop is the heart of asyncio. It doesn't run code in parallel across multiple...

📅 30.06.2026 👁️ 122
📝

pytest-django: Testing Django

Охватываемые темы: Installation, @pytest.mark.djangodb, Fixtures, Testing views.

📅 30.06.2026 👁️ 132
📝

run_in_executor and anyio: Sync Libraries in Asyn…

Sometimes you need to call a synchronous library from async code without blocking the event...

📅 30.06.2026 👁️ 101

Did you like the article?

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