...
To access this installation you need to run the following command:
/opt/conda/bin/conda init bash
Note: If for some reason you want to switch back to your personal conda setup and loose the use of environment switching using Jupyter Notebooks/Lab on the HPC simply run:
/home/<username>/*conda/bin/conda init bash
...
Code Block | ||
---|---|---|
|
/opt/conda/bin/conda init bash |
...
This modifies how you will be able to call your own existing envs from command line.
Namely all names are removed (i.e. if you had an env made with '-n my_env' typing `conda `conda activate my_env` env` would no longer activate the environment) as the conda binary is looking in /opt/conda and /home/$user${USER}/.conda/envs for environments.
To activate the environments you have created you’ll need to use the full path (i.e. `conda `conda activate /home/$user${USER}/*conda/envs/my_env`env`).
This will also change where you create environments. When you use `conda `conda create -n my_env` env` it will place it in a new folder located at /home/<username>/.conda/envs/ and you can activate it using the typical `conda `conda activate my_env`env`.
If you want to install in the old location instead of using `conda `conda create -n my_env` env` you will need to use the prefix option to point to your env folder: `conda `conda create -p /home/<username>${USER}/*conda/envs/my_env`env`. All environments created with the prefix option will have to be activate with the full path instead of the name.
...
To install the python kernel run: conda install -c anaconda ipykernel
To install the R kernel run: conda install -c r r-irkernel
You can change the active environment once inside the notebook (or when creating one) via kernels: Kernel > Change kernel > whatever_you_name_your_env
Note: If for some reason you want to switch back to your personal conda setup and loose the use of environment switching using Jupyter Notebooks/Lab on the HPC simply run:
Code Block |
---|
/home/${USER}/*conda/bin/conda init bash |
You will need to re-run /opt/conda/bin/conda init bash to enable environment switching again.
Warning |
---|
If you do not want to change permissions to your /home/ directory and subdirectories, please refer to these instructions on how to create a shareable environment: Creating shareable environments with conda outside of /home/ |
Tip | |||||
---|---|---|---|---|---|
If you want to have all shared environments visible and able to be activated by name alone, simply run the following command
|