What is a dependency?
A dependency is another piece of software your program needs to work, such as a library it imports.
Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?
A dependency is code your project relies on but did not write itself. A recipe that says use one jar of store-bought pesto has a dependency on the pesto. If the shop changes the recipe, your dish changes too. Software dependencies behave the same way, which is why versions matter so much.
Every import requests in Python or require('express') in Node pulls in a dependency, and those libraries have dependencies of their own, forming a tree. Projects pin versions in files like requirements.txt, package-lock.json or go.sum so everyone installs the same tree. Security scanners watch dependencies because a bug in one of them is a bug in your app.
pip install -r requirements.txt
npm ls --depth=0
See also: What is a package manager? and What is a virtual environment?
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0001 Virtual environments with venv A virtual environment is a private folder of Python packages for one project, so projects never fight over versions. Create one with… Beginner · Explains an idea · Any system Article Environments & packages 15 Oct 2026
- 0007 Fix: ModuleNotFoundError: No module named ‘…’ Python cannot find a module you import. Usually the package was installed into a different interpreter or virtual environment than the one… Beginner · Fixes an error · Any system Article Common errors · Environments & packages 15 Oct 2026
- 0011 Bootstrap a new Python project with a venv A Bash script that creates a project folder with a virtual environment, .gitignore, requirements.txt and a starter main.py, then runs it to… Intermediate · Step by step · Linux, macOS Script Environments & packages 15 Oct 2026
- 0261 Build a Python command-line to-do app: from empty folder to installable command Create a small to-do tool in Python with argparse and JSON storage, test it with pytest and package it with pyproject.toml so… Beginner · Guided project · Any system Article Environments & packages · Files & automation · Testing 15 Oct 2026
- 0283 What is a virtual environment? A virtual environment is a private folder of Python packages for one project, so different projects never clash. Beginner · Explains an idea · Any system Article Environments & packages 15 Oct 2026
- 0387 Install Python on Linux, macOS and Windows Install a current Python 3 with pip and venv on each desktop OS, check the version, and avoid the classic traps: python… Beginner · Step by step · Linux, macOS, Windows Article Environments & packages · Installing languages & tools 15 Oct 2026
Repos in the wild
- uv: Python package and project manager astral-sh/uv uv is a very fast Python package and project manager written in Rust. It replaces pip, venv and related tools, manages lock files and can install Python itself. GitHub
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Dominik +778 chars