Installing KvarQ

Precompiled packages

The different releases are available als compiled packages for Microsoft Windows and OSX (10.6 and later): http://github.com/kvarq/kvarq/releases

Note that the packages are currently not signed and you therefore have to enable OS X to run programs from unidentified developers if you run OS X 10.8 or newer.

Installing KvarQ From Source

The source code is hosted in a git repository at http://github.com/kvarq/kvarq

Dependencies

KvarQ does not have any external dependencies, apart from Sphinx_ for building the html documentation from the docs/*.rst sources files.

Linux

in case your system runs a python older than version 2.7, you have to install a newer version of python first; this is easiest done locally

wget http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz
tar xzf Python-2.7.4.tgz
cd Python-2.7.4
mkdir $HOME/py
./configure --prefix=$HOME/py
make && make install
PATH=$HOME/py/bin:$PATH
export $PATH
python -V

then download and install setuptools:

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

download the latest source distribution and build (calling setup.py with test will also copy the compiled library into the source directory)

wget https://github.com/kvarq/kvarq/archive/master.zip
unzip master.zip
rm master.zip
cd kvarq-master
python setup.py test

now you can either install KvarQ (optionally into a virtual environment):

python setup.py install

or setup an alias after including KvarQ into your PYTHONPATH. This is the method of choice if you intend to plan to modify the KvarQ source because you don’t need to make a fresh installation after every change – but don’t forget to re-run python setup.py test in case you changed the C source code to make sure the compiled extension is copied into the correct directory (or by sourcing the script . ./activate)

PYTHONPATH=`pwd`; export PYTHONPATH
alias kvarq='python -m kvarq.cli'
kvarq -h

In either way, you now have the KvarQ command at your disposal and can continue using the commandline or start the graphical user interface.

OS X

Prerequisites:

  • If you use OS X Snow Leopard (10.6) or below, you first have to install Python 2.7 (this version of python is included in OS X Lion 10.7 and newer; but you might nevertheless want to install a vanilla copy of Python)
  • On the other hand, OS X Snow Leopard and older include a C compiler that is needed to build the program. If you have no C compiler installed (you get a command not found error when you type gcc or clang at the Terminal), you need to download Xcode from Apple’s developer page (registering an account only takes some minutes). Choose Command Line Tools for Xcode from the “Developer Tools” category.

From this point on, follow the steps outlined in the Linux section. If you want to create an OS X application, you will also need to download and install py2app.

Windows

Prerequisites:

  • First download and install Python (at least version 2.7). You should download the 32bit version regardless of your machine architecture (or you will run into problems with the steps outlined below). If you plan to use python for scientific ends, you might want to install the Enthought Canopy Distribution that bundles many interesting packages.
  • Because KvarQ uses a compiled module to scan through the files you will have to install a C compiler. The simplest choice is to download and install Microsoft Visual Studio Express (e.g. VS Express 2012). This will automatically set the environment variable VSxx0COMNTOOLS (with xx being the version of visual studio).
  • KvarQ includes a pthreads in win32/pthreads for compiling the C extension. You have to copy this file into your windows folder or make sure that win32/pthreads is in your DLL search path.

You should now be able to download, build and test the program pretty much the same way as described above. To create a stand-alone executable package (via python setup.py py2exe) you will also need to download py2exe. Finally, you will probably want to install some packaging system (not installed by default) to get more python packages.