This is an old revision of the document!


Installation of extra applications or libraries

If you want to use an application that is not installed as module yet, there are usually two options: either we can install it as a new module, or you can try to install it yourself into your own directory in /home or /data. The first allows other users to make use of the software as well, while the latter has the advantage that you keep control over the software and can easily change, update or delete the software.

If you want to request the installation of certain software, please contact us. How you can install software yourself depends on the application. Most software for Linux is installed using a “configure, make, make install” procedure; in that case you could use the following to install it into your home directory:

./configure --prefix=$HOME/some/installation/directory
make
make install

Scripting or programming language like Perl, Python, and R allow you to easily install additional libraries/modules/packages to your own home directory. The following sections describe how you can do this for these specific languages.

In order to install Perl libraries to a custom location (in the following example we use $HOME/perl5), you first have to load a Perl version and install a Perl module named local::lib:

module load Perl
cpanm --local-lib=~/perl5 local::lib

Now you need to instruct Perl where the custom/local modules will be found:

eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)

Since you need to do this for every login, you may want to add that line to the special file ~/.bashrc, so that it gets run automatically when you log in:

echo 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)' >> ~/.bashrc

Finally, install the module that you need, e.g.:

cpanm name::of::module

There are various installation tools/methods for Python packages, each with their own way of specifying where the package should be installed. For all of them, make sure that you first load the module for the appropriate Python. For instance, if you want to use Python 3.6 compiled with the GCC compilers, use:

module load Python/3.6.4-foss-2018a

Then follow the instructions for one of the following installations methods, depending on the specific package to be installed.

pip

The pip command is included in the Python module. To install the package to your home directory, use the —user option, e.g.:

pip install --user name_of_package

easy_install

The easy_install command works in the same way as pip, e.g.:

easy_install --user name_of_package

setup.py

If you need to install a package that cannot be installed using pip or easy_install, you usually get a source archive that contains a setup.py file. Again, make sure to first load an appropriate Python module and then run:

python setup.py install --user

This will install the package to a lib directory in your home directory, just like pip and easy_install do. Python will automatically look for any installed packages in this specific directory.

R provides the install.packages command to install additional packages. Before you start submitting jobs, you can use it to install the packages that you need in the following way:

  • log in and load the R module that you would like to use, e.g.: module load R/3.3.1-foss-2016a
  • launch R by running the command: R
  • run the appropriate install.packages command for all packages that you want to install. The first time you will do this, R will ask you permission to create a personal library installation directory in your home directory.
  • quit using q()

Now the packages will be available for any job that you run. Note that you do have to do this again once you switch to a completely different R version.

Note that if you are trying to install something on the login node, you may run into certain limits that prevent you from using too much memory on the login node. See this question in the FAQ for more information.