layout | title | subtitle | minutes |
---|---|---|---|
page |
First Steps in LHCb |
Install party |
10 |
- Install git from source
- Install Anaconda
The lhcbstarterkitN
machines you used during this workshop will stop
existing after the weekend. In order for you to keep using the great tools
you learnt about in the last few days on lxplus
you have to install
them there by hand.
Once you install things yourself you have an environment that is different from the "standard" LHCb setup. It means you have to keep software up-to-date yourself and when things start going wrong everyone will blame it on your custom setup. Keep that in mind. With great tools, comes great responsibility.
These instructions are fairly straight forward and set you up with all the tools you learnt about in the last few days. It is also fairly easy to undo this setup and return to the standard LHCb setup.
We will install a modern version of git
and the Anaconda
python distribution.
Anaconda
is a complete set of python
interpreter and useful libraries. For example
it comes with ipython
pre-installed as well as matplotlib
and scikit-learn
.
To install Anaconda
on lxplus or your Mac/Linux laptop follow these
instructions:
- Visit the
Anaconda downloads
page. - Make sure to select the correct operating system (Windows, Mac or Linux)
- For
lxplus
download the Linux 64bit - Python2.7 installer. - Then on
lxplus
typebash Anaconda-2.2.0-Linux-x86_64.sh
in the directory to which you downloaded the installer. Usebash
no matter what your shell actually is. - Follow the on-screen instructions and go with the default answer to all questions.
This will install a modern set of python libraries to ~/anaconda
. This means you
need to have some free space on your AFS home directory. Once it is done check
that the installer added these two lines to your .bashrc
:
# added by Anaconda 2.2.0 installer
export PATH="~/anaconda/bin:$PATH"
Log out of lxplus
and back in. Now you should be able to start python
as well as
ipython
, etc.
To remove
Anaconda
temporarily, simply comment out the two lines that were added to your.bashrc
file. To permanently remove it simply delete theanaconda
directory in your home directory.
To install git
"from source" on lxplus
follow these instructions.
- Visit the git repository on github
- Click on "releases", which takes you to the list of all git releases
- Download the
.tar.gz
for the latest release (2.4.1) tolxplus
:
$ wget https://github.com/git/git/archive/v2.4.1.tar.gz
- unpack the
.tar.gz
withtar xzf v2.4.1.tar.gz
- Change to the newly created
git-2.4.1
directory:cd git-2.4.1
- Follow the INSTALL instructions.
- To install
git
in your home directory type:
$ export CURLDIR=$HOME/anaconda
$ mkdir $HOME/git-install-2.4.1
$ make prefix=$HOME/git-install-2.4.1
$ make prefix=$HOME/git-install-2.4.1 install
- Add the following line to your
.bashrc
:
export PATH="$HOME/git-install-2.4.1/bin:$PATH"
To temporarily remove
git
remove the line you added to your.bashrc
, and delete thegit-install-2.4.1
directory in your home directory to remove it permanently.