Skip to content

Environments

Conda utilises environments to group together the libraries and tools necessary for a particular task enabling you to use the specific versions of libraries you need for your program without impacting other tools (which use a different environment or indeed python version). We recommend that you create your own environment for development work as that makes it very easy to determine which libraries you need if you are installing elsewhere or indeed distributing it to others as you can create manifest files that will replicate the environment easily.
Creating environments

To create your own environment use:

    conda create --name=myenv python

This will create a bare-bones environment called myenv containing python 3.x and a few support tools. Add more python packages to the end if you know you need them immediately.

If you need to use python 2.x for the environment then use:

    conda create --name=myenv python=2

You can now activate this environment for use with:

    source activate myenv

At this point python is the version installed within the myenv environment.

For more details, look at the Conda documentation. And to see an example used in FMRiB see the fsl_mrs documentation