Anaconda

From LWP-Wiki
Revision as of 15:16, 2 August 2021 by Heiko (talk | contribs)
Jump to navigation Jump to search

The Anaconda Python distribution is available on LWP over and NFS mount. In order to use it on LWP instead of the locally installed Python, you need to load some environment variables into your shell.

To make Anaconda available in just your current bash session:

 bash$ source /opt/netapps/anaconda3/etc/profile.d/conda.sh     #   older lwp3 (Ubuntu 16.04)
 bash$ source /opt/netapps/anaconda-lwp4/etc/profile.d/conda.sh # current lwp4 (Ubuntu 20.04)
 bash$ conda activate

To have your shell startup files managed by Anaconda, so it will be available any time you start your shell:

 bash$ conda init

And after this, close and re-open your shell. Note that this last command also works with a select few other shells.

Custom environments

In order to be able to install additional packages using conda install <package> you'll need to your own environment. Such environment is stored in your home directory so it can be written to by you. By the commands above activate anaconda's default environment base and because it is stored centrally on the network it's not writable.

To create your own environment called "xmpl" (it is recommended to keep the name short):

 bash$ conda create --name xmpl

Activate this with:

 bash$ conda activate xmpl

Custom environments also allow you to use specific versions of python itself and/or module packages. For more information see the conda documentation about environments.

For more information see: