Skip to content

SetupTasksUbuntu

Sebastian Schmieschek edited this page Aug 12, 2015 · 2 revisions

Tools

Install each of the following

  • zlib-dev (zlib1g-dev on Ubuntum, necessary for installing setuptools from source if your distro doesn't have python 2.7 or higher)
  • python 2.7 ((either via a package or via wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz && tar -xvf Python-2.7.2.tgz && cd Python-2.7.2 && ./configure && make && make install)
  • python-argparse
  • setuptools (binaries like easy_install, not the same as the setuptool, our in-house programme for generating geometry files)
  • numpy

then run hemelb/Tools$ python setup.py install --user

Setup tool

Install the following:

  • Tools, as above
  • cmake
  • cmake-curses
  • git-core
  • python-vmtk
  • swig
  • libvtk51-dev then do hemelb/Tools/setuptool$ python setup.py install --user

Note: python-vmtk can be tricky to install on some platforms. However, if you use the default version of python (/usr/bin/python) and a recent Linux distribution, you may be able to install it very easily through the package manager (e.g., by using 'apt-get install vmtk').

Detail installation on Ubuntu 12.04 LTS with EPD python

Installing EPD python

  1. Create an account at https://www.enthought.com/products/getepd.php. Click on the "Academic" button. Open the registration form by clicking on "request an academic license here".
  2. Wait for an email from Enthought.com and activate your account.
  3. Wait for another email form Enthought.com specifying the repository address (http://www.enthought.com/products/repository.php). Do not download the free version from the web page.
  4. Open the repository and download version epd-7.3-2-rh5-x86_64.sh Be careful, version *rh3* includes a bug with libtiff library and the 32b versions won't work because of a problem with the size of LONG.
  5. Build EPD by typing bash epd-7.3-2-rh5-x86_64.sh
  6. Open .profile and add path to epd/bin into the PATH variable. Then add paths into HemeLB tools and setuptool into the PYTHONPATH variable export PYTHONPATH=$PYTHONPATH:hemelb-dev/hemelb/Tools:hemelb-dev/hemelb/Tools/setuptool

Fixing a bug in wxVTKRenderWindowInteractor.py. If not fixed, this bug causes segmentation fault when launching hemelb-setup

  1. Open file /epd/lib/python2.7/site-packages/vtk/wx/wxVTKRenderWindowInteractor.py
  2. Change line 350 from d = '_%s_%s' % (d[2:], 'void_p') to d = '_%s_%s\0' % (d[2:], 'void_p')

Installing vmtk

  1. Open the following link http://www.vmtk.org/Main/Installation/
  2. Install from source and follow the instructions displayed at the web page
  3. When configuring using ccmake, set up the path for VTK into EPD folder.

Installing cgal on Ubunti 12.04

  1. apt-get install libcgal8
  2. apt-get install libcgal-dev

Compiling setup-tool

  1. Enter folder hemelb-dev/hemelb/Tools type python setup.py build_ext --inplace
  2. Enter folder hemelb-dev/hemelb/Tools/setuptool type python setup.py build_ext --inplace

Alternative Detail Installation on Ubuntu 12.04 LTS

Needed Packages

Zlib Dev

  • zlib1g-dev

Python and some extensions

  • python2.7
  • python-argparse
  • python-setuptools
  • python-numpy

VMTK

  • libvmtk0.9
  • python-vmtk

CGAL

  • libcgal8
  • libcgal-dev

wxWidgets

  • wx-common
  • python-wxgtk2.8
  • python-wxtools
  • python-wxversion

Some dependencies that popped up (just fyi)

Boost: libboost-date-time1.46-dev libboost-dev libboost-program-options-dev libboost-program-options1.46-dev libboost-program-options1.46.1 libboost-serialization1.46-dev libboost-thread-dev libboost-thread1.46-dev libboost-thread1.46.1 libboost1.46-dev

JPEG-LS: libcharls1

Grassroots DiCoM is a C++ library for DICOM medical files: libgdcm2.0

Multiprecision arithmetic library developers tools: libgmp-dev libgmpxx4ldbl

Image registration toolkit: libinsighttoolkit3.20

Multi-precision floating-point lib: libmpfr-dev

Rebuilding the setuptool

(from the README in the Tools/setuptool directory)

You can build the setuptool locally with:

python setup.py build_ext --inplace

As a prerequisite you will need to run the same command in hemelb-dev/hemelb/Tools to generate a number of C source files from Cython code.

In order to do a clean build (after modifications, etc.), you will need to remove the following files:

HemeLbSetupTool/Model/Generation.py HemeLbSetupTool/Model/Generation/Wrap.cpp HemeLbSetupTool/Model/_Generation.so

Compiling setup-tool

  1. Enter folder hemelb-dev/hemelb/Tools type python setup.py build_ext --inplace
  2. Enter folder hemelb-dev/hemelb/Tools/setuptool type python setup.py build_ext --inplace
Clone this wiki locally