Trshant's blog

Ramblings of an uncertain mind.

View on GitHub

2 Notes on Conda

install Conda

sh Miniconda3-latest-MacOSX-x86_64.sh

Create an environment

conda create -n MY_ENV python=3.6

Listing the envs

conda env list

Activate the env

conda activate MY_ENV

Deactivate env

conda deactivate

Delete env

conda env remove --name MY_ENV

Export the env

conda env export > environment.yml

Restoring the env from a yml file

conda env create -f environment.yml

Cloning the env

conda create --name myclone --clone myenv

Using the env in a python file as a shebang

#!/usr/bin/env conda run -n my_env python

Install : https://docs.conda.io/en/latest/miniconda.html Documentation : https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html