Anaconda Installation

Anaconda Command

  1. Use conda to create virtual environment
    1
    2
    3
    conda create -n py2 python=2 %% create a virtual environment with python 2.* installed

    conda create -n py3 python=3 %% create a virtual environment with python 3.* installed

Environments

share environments

  1. Generate your own environment.yaml file

    1
    conda env export > environment.yaml
  2. For people not using conda, share the pip requirements.txt file: more information

    1
    pip freeze > requirements.txt

Listing environments

  • Use conda env list to list out all the environments you’ve created. You should see a list of environments, there will be an asterisk next to the environment you’re currently in. The default environment, the environment used when you aren’t in one, is called root.

Removing environments

  • Use conda env remove -n env_name will remove the specified environment (here, named env_name).

Resources