Conda is a package manager that simplifies the installation of scientific software. It helps in creating isolated environments for different projects, ensuring reproducibility and preventing dependency conflicts.
Why Conda?
- Solves Dependencies: Automatically resolves and installs all package dependencies
- Environment Isolation: Keep different projects separate with their own package versions
- Cross-Platform: Works consistently across Windows, macOS, and Linux
- Scientific Focus: Optimized for data science and research computing packages
Installation
We recommend installing Miniforge, which includes conda and uses conda-forge as the default channel.
- Download Miniforge from the official website
- Run the installer for your operating system
- Follow the installation prompts
- Restart your terminal/command prompt
Getting Started
Create a new environment:
conda create -n myenv python=3.11
conda activate myenv
Install packages:
conda install numpy pandas matplotlib
Best Practices
- Use separate environments for different projects
- Keep your base environment minimal
- Export environment specifications for reproducibility:
conda env export > environment.yml - Use
conda-forgechannel for the latest packages
Tips
- List environments:
conda env list - Remove environment:
conda env remove -n myenv - Update packages:
conda update --all