Skip to content

Instantly share code, notes, and snippets.

@xaratustrah
Last active March 10, 2021 13:02
Show Gist options
  • Save xaratustrah/5f03425a1fc8242324f49cd79e9211f7 to your computer and use it in GitHub Desktop.
Save xaratustrah/5f03425a1fc8242324f49cd79e9211f7 to your computer and use it in GitHub Desktop.
anaconda_root.md

Data analysis with Anaconda CERN ROOT and GPU stuff

In this tutorial no root access (sudo) is needed. All installations can be done under the home directory or on a local hard disk.

Install Anaconda

Download Anaconda from its download page. I prefer the command line installer since I have better control over the remote session. For example:

curl -O https://repo.anaconda.com/archive/Anaconda_XXXXXXX.sh

Where the XXXX is then the current version of Anaconda.

Then run it:

sh ./Anaconda_XXXXXXX.sh

and then go through the installation in a path in your home directory, which should be the default path. At the end of the installation you will be asked about installing an editor. I personally do not use it.

You can check your installation by

`which python` --version && `which pip` --version

The installation adds the local path by default to your local installation. You can additionally set the PYTHONPATH environmental variable to make sure your local work which is not installed as a package is visible to the python interpreter.

virtualenv

The best way to start with data analysis with python is using virtual environments in conda. You can activate the virtualenv and also list all envs by (conda info --envs). You will see the environment name at the beginning of the common prompt.

Deactivating an envoronemt is like:

conda deactivate

If under circumstances you like to remove the environment:

conda env remove --name ENV_NAME

Installing CERN ROOT inside conda

I remove this section of the tutorial and instead point to this wonderful page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment