Skip to main content

Anaconda

"Anaconda is the hardware store of data science tools, Miniconda is the workbench (software distributions), Conda is the assistant (package manager) who helps you get new tools and customise your hardware store or workbench."

Linux Installation Instructions


1. Install Anaconda (if not already installed)

If Anaconda is not installed, you can download and install it:

wget https://repo.anaconda.com/archive/Anaconda3-latest-Linux-x86_64.sh
bash Anaconda3-latest-Linux-x86_64.sh

Follow the installation prompts, and ensure you add Anaconda to your PATH (usually done by default during installation).


2. Verify Conda Installation

Check if Conda is installed:

conda --version

You should see the version of Conda installed. If not, ensure that Anaconda's bin directory is added to your PATH.


3. Create Environment from .yaml File (optional)

Assume your environment file is named environment.yaml.

Command:

conda env create -f environment.yaml

This command will:

  • Create a new environment with the name specified in the .yaml file.
  • Install all the packages and dependencies listed in the file.

4. Activate the Environment

After the environment is created, activate it:

conda activate <environment_name>

Replace <environment_name> with the name of the environment defined in the .yaml file.


5. Verify the Environment

Check that the environment is correctly set up:

conda list

This lists all the installed packages in the active environment.


Troubleshooting

  • Error: "Environment name already exists" If the environment already exists, you can remove it and recreate it:

    conda remove --name <environment_name> --all
    conda env create -f environment.yaml
  • Missing dependencies or conflicts Ensure the .yaml file is correctly formatted and lists compatible packages. You can manually inspect the file or resolve conflicts using:

    conda env create -f environment.yaml --debug

REFERENCES:

For more information on virtual environments please go to

https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment

More installation instructions:

https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html