Managing Dependencies with pip
Install packages, pin versions, and use requirements.txt.
Managing Dependencies with pip is a free Python Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Python Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Introduction
pip install Basics
# pip install requests
# pip install requests==2.31.0
# pip install 'requests>=2.25,<3'
print('install demo')pip freeze
# pip freeze > requirements.txt
# Contents like:
# requests==2.31.0
# urllib3==2.0.4
print('freeze demo')pip install -r
# pip install -r requirements.txt
# Installs exactly what freeze captured
print('install -r demo')Dev vs Prod Dependencies
# requirements.txt:
# requests==2.31.0
# requirements-dev.txt:
# pytest==7.4.0
# black==23.7.0
print('separate deps demo')pip show
# pip show requests
# Output:
# Name: requests
# Version: 2.31.0
# Requires: certifi, charset-normalizer, idna, urllib3
print('show demo')pip list --outdated
# pip list --outdated
# Package Version Latest Type
# requests 2.28.0 2.31.0 wheel
print('outdated demo')Pinning Strategies
# Production: pin exact
# requests==2.31.0
# Development: allow compatible
# requests~=2.31
print('pinning strategy')pip check
# pip check
# No broken requirements found.
print('check demo')Editable Installs
# In your project root with pyproject.toml:
# pip install -e .
# Now changes to src/ are live
print('editable demo')pip-audit for Security
# pip install pip-audit
# pip-audit
# No known vulnerabilities found.
print('audit demo')Quick Check
Recap
Keep Going
Frequently asked questions
Is the “Managing Dependencies with pip” lesson free?
Yes — the full text of “Managing Dependencies with pip” is free to read here on the web, and the Python Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Python Academy course, upgrade to CoddyKit PRO.
What will I learn in “Managing Dependencies with pip”?
Install packages, pin versions, and use requirements.txt. You practise Python Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Python Academy?
No prior experience is required. Python Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Managing Dependencies with pip” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Python Academy lesson?
Yes. Every Python Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Virtual Environments Matter
- Creating and Activating venv
- Managing Dependencies with pip
- Modern Tools: pipenv and uv