Anaconda is open source distribution that aims to simplify package management and deployment. It is often used to manage python project. You can create and use independent virtual environment.

With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them. Switching or moving between environments is called activating the environment. You can also share an environment file.

1. Enviroment Create


  1. Create an environment using the command below on Anaconda Prompt. (on the base environment)

      you can specify the version of Python using an argument below. If you do not specify the version of Python, the environment is depended on the base environment. I don't know why that happens, but I recommend specifing the version of Python.

  2. Input y when you get outputs like the image below.

  3. Wait for seconds to install.

  4. It is over when you get outputs like the image below.



2. Check your envs


  You can check your env using the command ‘conda env list’ or ‘conda info –envs’. You can check names and local directories of envs.

3. Remove env


  You can remove an env using the command above. But, sometimes the folder of an env you remove is not deleted. Just delete the folder.

4. Export env


  You can export your env for using on another servers, devices or etc. Follow the sequence.

  1. Activate the env you want to export.

  2. Export env as yaml file. The file will be created at the directory where your Anaconda Prompt is.

      Some exported dependencies will be working well in the specific environment including device, OS and etc. So, sometimes (othen between Linux and Windows), problems occur when you importing the env.



5. Import env


  You can create an env using the command above. It create a new env following meta data in yaml file including the name of env.



Refers


Conda docs
NEO, “[Anaconda] 아나콘다 가상환경 삭제”
conda/conda issue “remove –all doesn’t delete the environment #201”
stack overflow, “How to clean up anaconda base environment?”
행궁동 데이터 엔지니어, “[Anaconda] 아나콘다 가상환경 Export 및 Import 하는 방법”