Conda Basics
mar. 22 janvier 2019 by Martin DeudonConcepts
We list here some basic commands to manage environments with conda. Conda is a package manager and environment manager. It is included with the Anaconda Python distribution. Thus you should have already installed Anaconda
A conda environment is a directory that contains a specific collection of conda packages that you have installed. For example you may have an environment for doing Spike Sorting, another for running other analyses, etc...
You can easily switch between environments. It allows you to seperate the environment for your different projects, as all you projects may need different packages or different version of these packages.
A complete documentation for conda is available here
A cheatsheet listing more commands can be downloaded here
Create a new environment
To create a new environment named spikesortingenv:
conda create --name spikesortingenv
Specify the version of python you want :
conda create --name spikesortingenv python=3.5
Activate an environment
On Windows :
activate spikesortingenv
On Linux and macOS :
source activate spikesortingenv
List all your environments
conda env list
Remove an environment
Remove the spikesortingenv environment :
conda env remove -n spikesortingenv