Installation

Important Note for Users of the CC-IN3P3 in Lyon

KM3Pipe is preinstalled on the Lyon computing centre. Put this into your ~/.bashrc or ~/.zshenv (or whatever login script you prefer)::

source $KM3NET_THRONG_DIR/src/python/pyenv.sh

To test if everything is working, run the following command:

km3pipe test

And you are ready to go! This will work on both Scientific Linux 6 and Cent OS machines as the $KM3NET_THRONG_DIR, set by your group environment, is pointing to different directories. The Python environment also contains the latest versions of all important and commonly used scientific packages like scipy, numpy, scikit-learn, pandas etc.

If you are missing any packages, contact us and we will install them.

Requirements

To install km3pipe, you need:

  • Python >= 3.5
  • pip (via $ easy_install pip)
  • C compiler, e.g. gcc.
  • HDF5 (the hdf5lib C library, e.g. apt-get install hdf5 or yum install hdf5)

Install

To install the latest stable version fromm the PyPI repository::

$ pip install km3pipe

It might be advisable to use::

$ easy_install km3pipe

on Windows.

To get the latest version, use::

$ pip install git+http://git.km3net.de/km3py/km3pipe.git

Install from Source

To install KM3Pipe from source, clone the git repository:

$ git clone http://git.km3net.de/km3py/km3pipe.git

check out your desired branch:

$ git checkout master  # or any other branch you are interested in

and run:

$ make install

To install it in development-mode, which will just link the folder to your Python site-packages, so you will be able to modify KM3Pipe and use it immediately without the need to reinstall it:

$ make install-dev

Run the Test Suite

To run the unit test suite, you can either run:

$ km3pipe test

or if you have checked out the sources:

$ make test

Updating

KM3Pipe comes with a command line utility called km3pipe, which can be used to update KM3Pipe itself:

$ km3pipe update

Or you can of course use pip:

$ pip install --upgrade km3pipe

To get the latest developer version:

$ km3pipe update master

If you installed KM3Pipe from source via make install-dev, you simply pull the changes from git and rebuild it:

$ cd /path/to/km3pipe_repo
$ git pull

Configuration

KM3Pipe can read frequently used information (like DB session cookies, API tokens, etc.) from a configuration file, which is expected to be ~/.km3net.

Here is an example configuration:

[General]
check_for_updates=no

[DB]
cookie=sid_fooman_123.34.56.78_