conda
venv + pip can only manage Python packages. Once a project depends on scientific-computing packages like NumPy or PyTorch — which bundle non-Python binary libraries such as C/C++/CUDA under the hood — a plain pip install often runs into compilation failures or mismatched system library versions. conda is a language-agnostic package and environment manager that can manage both the Python version itself and these low-level binary dependencies, making it the de facto standard in data science and machine learning.
Installation
conda comes in two common distributions:
- Anaconda: ships with hundreds of pre-installed data science packages, large in size (several GB) — convenient for beginners who want everything installed up front.
- Miniconda / Miniforge: includes only conda itself plus a handful of base packages, small and installed on demand — recommended for servers and production environments. Miniforge defaults to the community-maintained conda-forge channel and has a more permissive license.
# Miniforge example (Linux/macOS): download, then install silently
bash Miniforge3-$(uname)-$(uname -m).sh -b
# Initialize your shell after installation
conda init bash # or zsh / fish, etc.Creating and Managing Environments
# Create an environment pinned to a specific Python version, with some packages pre-installed
conda create --name myenv python=3.12 numpy pandas
# Activate / deactivate the environment
conda activate myenv
conda deactivate
# List all environments
conda env list
# Install a package into an existing environment (from the defaults channel)
conda install --name myenv matplotlib
# Install from a specific channel (conda-forge is community-maintained, with faster, broader package updates)
conda install conda-forge::numpy
# Remove an environment
conda env remove --name myenvExporting and Reproducing Environments
# Export the full dependency set of the currently active environment to a YAML file
conda export > environment.yaml
# Recreate the environment on another machine from that file
conda env create -f environment.yamlenvironment.yaml serves a similar purpose to requirements.txt, but it can describe the Python version, conda packages, and pip packages all at once — well suited for teams sharing complex environments with binary dependencies.
Summary
conda’s core strength is managing non-Python binary dependencies (CUDA, MKL, precompiled scientific libraries, and the like), at the cost of larger environments and generally slower dependency resolution than pip/uv. For everyday web development or pure-Python projects, there’s no need to bring in conda — but for deep learning, GPU-accelerated libraries, or projects with complex C extensions, conda (or Miniforge) remains the lower-friction choice.