Conda & the conda-forge project#

Education objectives

  • Conda, its history and recent evolutions

  • conda-forge

  • Pixi

What is Conda and why does it exist?#

Conda is a language-agnostic, cross-platform package manager and environment management system. It was created to solve several challenges in scientific computing:

  • Dependency management: Automatically resolving complex dependencies between packages

  • Multi-language support: Managing packages written in Python, R, C, C++, Fortran, and other languages

  • Binary distribution: Providing pre-compiled software to avoid compilation issues

  • Environment isolation: Creating separate environments for different projects to avoid conflicts

  • Cross-platform consistency: Working the same way on Linux, macOS, and Windows

Unlike Python’s built-in pip (which installs Python packages) and venv (which creates Python-only environments), conda can manage non-Python dependencies like compilers, scientific libraries (BLAS, LAPACK), and system tools.

History and evolution#

The beginning: Anaconda, Inc. and the Anaconda distribution#

Anaconda, Inc. (formerly Continuum Analytics) is an American company that created both the Anaconda distribution and the conda application.

The Anaconda distribution is a large software distribution designed for data science, with hundreds of pre-installed packages focusing on Python and R. The distribution includes the conda command-line application for installing packages and managing environments.

Warning

The Anaconda Terms of Service are quite restrictive. Since 2020, commercial use by organizations with more than 200 employees requires a paid license. For most users in 2025, there are better free and open-source alternatives.

Miniconda is a minimal version of the Anaconda distribution that includes only Python and conda itself, allowing you to install packages as needed.

Warning

Anaconda Terms of Service also apply to Miniconda. If you need conda, we recommend installing Miniforge instead, which uses the community-driven conda-forge channel and has no such restrictions.

Understanding conda packages#

A conda package is a compressed archive containing:

  • Compiled binaries (libraries and executables)

  • Source code files (Python, R, etc.)

  • Metadata about dependencies and compatibility

  • Installation instructions

Because conda packages contain binaries, they can include software written in any language—Python, C, Fortran, C++, R—making conda particularly powerful for scientific computing where Python often depends on compiled libraries.

Conda environments#

The concept of conda environments is central to the conda ecosystem.

Definition: environment

An environment is an isolated set of programs and libraries with specific versions. It is defined by:

  • The software installed in a particular directory

  • Environment variables, particularly PATH (which determines where your shell looks for programs) and CONDA_PREFIX (pointing to the environment location)

You can examine your current PATH with echo $PATH (POSIX) or $env:Path (Windows PowerShell).

Basic conda commands:

# Create a new environment with specific packages
conda create -n myproject python=3.11 numpy pandas matplotlib

# Activate the environment
conda activate myproject

# Install additional packages
conda install scikit-learn

# Deactivate the environment
conda deactivate

# List all environments
conda env list

Tip

Never install packages in the base environment. Use separate environments for different projects.

The base environment is where conda itself is installed. Adding packages to it can create conflicts and make it difficult to update conda. Always create project-specific environments.

Tip

Do not activate any environment by default. This is a common bad practice that can interfere with other tools and cause confusion.

If you see (base) in your terminal prompt when you open it, disable automatic activation:

conda config --set auto_activate_base false

Verify that (base) no longer appears after opening a new terminal.

Package channels and repositories#

The conda application retrieves packages from https://anaconda.org/, a package repository hosted in the USA by Anaconda, Inc. This repository infrastructure allows different organizations to host their own channels (collections of packages).

Important channels include:

The conda-forge revolution#

conda-forge emerged as a community-led infrastructure for building and distributing conda packages. It is supported by NumFOCUS (a US non-profit supporting open-source scientific software).

Crucially, Anaconda Terms of Service do not apply to conda-forge packages. This enabled the growth of a vibrant open-source community around conda, free from commercial licensing restrictions.

Miniforge is a modified version of Miniconda that uses the conda-forge channel by default instead of the Anaconda channel. This is now the recommended way to install conda for most users.

Modern developments#

The conda ecosystem has evolved significantly:

Performance improvements:

  • conda originally had significant performance issues with slow dependency solving

  • Mamba was developed as a faster C++/Python reimplementation of conda

  • Modern conda now uses the libmamba solver internally, making it much faster

  • Micromamba provides conda functionality without requiring Python

European innovation: Two European companies (QuantStack and Prefix) have invested heavily in the conda ecosystem, creating modern tooling:

Pixi is a modern package management tool built on the conda ecosystem, written in Rust. It offers:

  • Fast dependency resolution

  • Project-based workflow (similar to npm or cargo)

  • Lock files for reproducibility

  • Easy global application installation

Example: Installing IPython globally with Pixi

pixi global install ipython --with matplotlib --with pandas

Note

This approach is particularly useful because the Matplotlib conda package includes Qt dependencies (PySide), enabling interactive figure windows—something more difficult to achieve with pip.

Alternative infrastructure:

Current recommendations (2025)#

The conda ecosystem has matured into a fully open-source solution with minimal dependency on Anaconda, Inc.

Not recommended:

  • Installing the full Anaconda distribution

  • Installing Miniconda (unless you specifically need conda/mamba commands and understand the ToS)

Recommended approaches:

  1. For modern project-based workflows: Install Pixi

    • Best for: Developers wanting reproducible, project-based environments

    • Advantages: Fast, modern, lock files, easy to use

    • Use with: https://prefix.dev or conda-forge

  2. For traditional conda workflows: Install Miniforge

    • Best for: Users familiar with conda who want conda/mamba commands

    • Advantages: Full conda compatibility, conda-forge by default

    • Provides: conda and mamba commands

  3. For minimal installations: Use Micromamba

    • Best for: CI/CD pipelines, Docker containers, minimal environments

    • Advantages: Small, fast, no Python dependency

When to use conda vs PyPI#

Use Pixi/conda-forge when:

  • You want a modern, fast, reproducible workflow

  • You’re starting a new project and want best practices from day one

  • You need non-Python dependencies (compilers, scientific libraries, Qt, etc.)

  • You’re working on Windows and need complex scientific software

  • Your project requires R, Python, and C/C++ packages together

  • You need pre-compiled binaries for faster installation

Use conda/conda-forge/bioconda when:

  • You want to reproduce old workflow involving conda commands

Use modern solutions based on PyPI (PDM, UV, …) when:

  • You want a modern, fast, reproducible workflow

  • You’re starting a new project and want best practices from day one

  • You’re working on a Python package that has to be uploaded on PyPI

  • You need the very latest package versions (PyPI is often more up-to-date)

  • You need to use non-Python dependencies installed with other methods

Summary#

It is now possible to use the conda ecosystem without strong dependencies on Anaconda, Inc. The community-driven conda-forge channel and modern tools like Pixi and Miniforge provide powerful, open-source alternatives.

Bottom line: Unless you have specific requirements, avoid the Anaconda distribution and Miniconda. Start with Pixi for modern workflows or Miniforge for traditional conda usage.