Anaconda python on hail in 2020 |
Anaconda (conda) has grown from its linux-centric collection of shell
scripts into a multi-platform package manager. source
activate
is out. conda
commands are the new way. Please switch
to the new way by running though these instructions.
First we want to have the conda command available when we log in:
This adds a few lines to your ~/.bashrc file. It also checks for the existence of and creates if necessary the file ~/.condarc and the folder ~/.conda to hold your local envs. The next time you log in, the conda base env will be loaded. If you’d rather not have the base env loaded every time you log in, you can modify this with:
The conda command will still be available for use, but no envs will be active. As part of our multi-user installation, please run the following to prevent package cache collisions.
Many of you will be using the conda-forge channel. It may be easier if you set that priority now, before you start building. Mixing of channels can send you into dependency hell.
After logging out and back in. Everything should be ready for you to conda all your old envs. To activate an env,
if no env is supplied, it will activate the base environment.
env creation is pretty much the same. Here we create and activate an env named my_env.
add some packages
You can always start over. To nuke an env you’ve destroyed:
You can also remove and reinstall packages in the active env, for example:
The user guide is here https://docs.conda.io/projects/conda/en/latest/user-guide/index.html
Step 1: On your local machine terminal
Step 2: On hail make sure you have jupyter lab itself installed (conda install jupyterlab) and then type the following
As you are probably familiar with, your terminal will display a bunch of stuff, just set it aside so you don't exit out of it.
Step 3: On your local machine, in an internt browser (firefox, chrome, safari) go to
or you can click on the link at the bottom of what it spits out and it will open in a new browser window. You'll have to log in to jupyter. You can set a jupyter password with
on hail in the activated environment with jupyter lab downloaded. Localhost 55441, 55442, and 55443 work on hail. Step 4: To quit jupyter, on your local machine exit out of the tab your notebook is open on
and then
to exit out of the notebook and return to the normal shell.
Thank you to Kelly Hirai and Catherine Stauffer for putting together this guide.
This document was translated from LATEX by HEVEA.