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, download and install it using the following commands:

wget https://repo.anaconda.com/archive/Anaconda3-latest-Linux-x86_64.sh
bash Anaconda3-latest-Linux-x86_64.sh
  • Follow the installation prompts.
  • Ensure Anaconda is added to your PATH (this is usually done automatically during installation).

2. Verify Conda Installation

Check if Conda is installed:

conda --version
  • You should see the version of Conda displayed.
  • If not, ensure that Anaconda's bin directory is included in your PATH.

3. Create an Environment

To create a new environment manually, run:

conda env create --name <environment_name>

Replace <environment_name> with your desired environment name.


4. Create an Environment from a .yaml File (optional)

If you have a .yaml file (e.g., environment.yaml) specifying environment dependencies, create the environment using:

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.

5. Activate the Environment

Activate the newly created environment:

conda activate <environment_name>

Replace <environment_name> with the name of your environment.


6. Verify the Environment

Ensure the environment is set up correctly by listing its installed packages:

conda list

This will display all packages installed in the active environment.


Troubleshooting

Error: "Environment name already exists"

If you encounter this error, you can remove the existing environment 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. For debugging, you can use:

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