Anaconda Python at FLASH
OUTDATED (Dec 2024) ... to be adapted to current situation ...
Maxwell
TL;DR
The usual work flow, in case Anaconda is set-up:
(note that this is only tested for bash shell !)
(flash)$ ipython
[0]: import pydoocs
...
[999]: exit
(flash)$ conda deactivate
Anaconda Python environments and package installs at Maxwell
The default Pythons change frequently on Maxwell. We suggest to always load a specific Anaconda module and to add the module load command to your .bashrc file. The environments you create here, are then also selectable on Maxwell's central JupyterHub.
This example uses the Anaconda module anaconda3/5.2. This is loaded by the command
By the way, to check which modules are loaded do
To list available Anaconda channels (i.e. Anaconda package sources):
To add the FLASH channels, i.e. the sources of the FLASH software not available in standard, preconfigured sources:
To list available Anaconda virtual Python environments
To create your own environment, e.g. named flash:
Note, ipykernel is required, if you want to use the central JupyterHub installation on Maxwell. We do recommend to include ipykernel.
Also note, if you choose Python version 3.6 on any of the Maxwell nodes, you also have to downgrade the prompt_tookit to version 2.0.10. Execute the command
To activate the environment named flash:
The active environment is shown enclosed in parentheses in front of the shell's command prompt.
To list the Anaconda packages available in your active environment:
To permanently install e.g. pydoocs into your active environment:
To deactivate the environment:
flashlxuser1 and 2, hasfcons0 to hasfcons15, haskcons0 to haskcons3
TL;DR
The usual work flow, in case Anaconda is set-up:
(note that this is only tested for bash shell !)
(flash)$ ipython
[0]: import pydoocs
...
[999]: exit
(flash)$ conda deactivate
Anaconda Python environments at flashlxuser[1, 2] and hasfcons[0-15], haskcons[0-3]
Anaconda is not the default on the user workstations and consoles in the FLASH halls or the FLASH servers flashlxuser1 and 2. On the consoles the module system does not contain an Anaconda module. Yet, a current Anaconda distribution is installed on all these machines at /opt/conda/.
To list available Anaconda channels (i.e. Anaconda package sources):
To add the FLASH channels, i.e. the sources of the FLASH software not available in standard, preconfigured sources:
To list available Anaconda virtual Python environments
To create your own environment, e.g. named flash, choosing your favourite Python version. Pydoocs packages are available for version 2.7, 3.6, and 3.7. Here we select the most recent 3.7. We recommend to include ipykernel for the IPython console and Jupyter Notebooks.
To activate the environment named flash (note, this intentionally differs from the output of the previous command):
The active environment is shown in parentheses in front of the shell's command prompt.
To list the Anaconda packages available in your active environment:
To permanently install e.g. Pydoocs into your active environment:
To deactivate the environment:
To remove an environment named test permanently:
Caveat - flashlxuser[1,2]
As no there is no alias for conda on flahlxuser1 & flashlxuser2 - Use:
References
- : Christopher Behrens on Benefits of Anaconda and Virtual Envronments, 2019-01-14
- : Christopher Behrens on FLASH Anaconda Packages and Repositories, 2019-02-11
- : Christopher Behrens on Conda Packages with Jupyterhub, 2019-04-xx