Installation

Instructions

From local VHC copy

First you need to obtain the source VHC code with

svn checkout svn://luna.mpe.mpg.de/vhc/trunk vhc

Once this command has finished you can install VHC using pip

pip install /path/to/vhc

or

cd /path/to/vhc
pip install .

where /path/to/vhc is the base VHC directory containing the setup.py file.

From online svn repository

It is also possible to install VHC directly from the svn repository with

pip install svn+svn://luna.mpe.mpg.de/vhc/trunk#egg=vhc

Except for fetching the code for you, it works exactly as before.

If you want to install a specific commit or from a different branch or tag, you can do it issuing one of the following commands

pip install svn+svn://luna.mpe.mpg.de/vhc/trunk@5#egg=vhc
pip install svn+svn://luna.mpe.mpg.de/vhc/tag/v0.0.0#egg=vhc

Other ways

Once you obtained the source code as in From local VHC copy, you can install the code also using the good old

cd /path/to/vhc
python setup.py build
python setup.py install

We do not recommend this method, as you have to deal with dependences yourself.

Warning

  • If the installation gets interrupted with an error like:

    ImportError: No module named 'numpy'
    

    run pip install numpy and then retry VHC installation

Dependances

Mandatory dependences

vhc_config
pyhetdex
jinja2
six

vhc_config contains all the configuration and files needed to run vhc (see VHC configuration).

ltl and cure

cure is a C++ code that provides utilities that are executed by almost all the drivers shipped with the code. Thus, although VHC does not depend on it, we provide here instruction on how to install cure and ltl, a library cure depends on.

Check out and compile ltl:

cd /path/to/project
svn checkout svn://luna.mpe.mpg.de/ltl/trunk ltl
cd ltl
./bootstrap
./configure
make
cd ..

Check out and compile cure:

svn checkout svn://luna.mpe.mpg.de/cure/trunk cure
cd cure
make install

This will install the binaries into bin directory. If you don’t have OpenGL libraries installed, run:

make install HAVE_OPENGL=no

as last step. You can use make -j N to speed up the build process using N cores.

After it is installed, you might want to:

export CUREBIN=/path/to/project/cure/bin

Optional dependences

  • testing:

    pytest>=3.3
    pytest-cov
    pyhetdex>=0.8
    beautifulsoup
    
    tox
    
  • documentation:

    sphinx
    numpydoc
    alabaster
    pyhetdex
    
  • automatic documentation build:

    sphinx-autobuild
    

Development

If you develop VHC we suggest to checkout both svn repositories and to install them in “editable” mode and to install all the optional dependances:

cd /path/to/vhc
pip install -e .[all]

You can also use [not recommended]

python setup.py develop

See Contribute to VHC for more information.