*  VTK

        * Building VTK 7.0.0 with Python 3.4.1 wrapper under ubuntu 14.10 LTS

*  Building VTK 7.0.0 with Python 3.4.1 wrapper under ubuntu 14.10 LTS

Building Python 3.4.1 : We suppose Python 3.4.1 build with shared library using the following commands

  wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz 
  tar -Jxf Python-3.4.1.tar.xz 
  cd Python-3.4.1 
  ./configure  --enable-shared --prefix=/opt/python3.4.1 
  make -j 4 
  sudo make install

The installation of python modules numpy, scipy, sympy, matplotlib is given in ??.

Building VTK 7.0.0 : We first get the source and create an empty directory VTK-7.0.0

wget http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz 
tar zxvf VTK-7.0.0.tar.gz 
mkdir VTK-7.0.0-build 
cd VTK-7.0.0-build

Then we use ccmake to configure
ccmake ../VTK-7.0.0/

We press [c] to run the first configuration step Then we set some values in advanced mode [t] where <USER> is your username

CMAKE_INSTALL_PREFIX /home/<USER>/local
VTK_WRAP_PYTHON ON
VTK_PYTHON_VERSION 3.4
VTK_WRAP_TCL ON
PYTHON_EXECUTABLE /opt/python3.4.1/bin/python3.4
PYTHON_INCLUDE_DIR /opt/python3.4.1/include/python3.4m
PYTHON_LIBRARY /opt/python3.4.1/lib/libpython3.4m.so
PYTHON_UTIL_LIBRARY /usr/lib/x86_64-linux-gnu/libutil.so

Then press the key [c] to launch the complete configuration (sometimes it is necessary to start again this stage several times until until appearance of the option [g] to generate and exit)

We finalize by using

make -j 4 
make install

To use with Python we must set the environment variables PYTHONPATH and LD_LIBRARY_PATH. In bash :

export PYTHONPATH=$HOME/local/lib/python3.4/site-packages 
export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH

For a simple test launch /opt/python3.4.1/bin/python3.4 and

import vtk