Follow instructions on the website http://pyve.sourceforge.net.
You should first install VTK.
You can contemplate to use the version from debian
apt-get install mesa-common-dev apt-get install libvtk5.8 libvtk5-dev libvtk-java python-vtk python-dev
Or compile it yourself. Pay attention to a few parameters as explained here.
Cmake flags
CMAKE_CXX_FLAGS -I /opt/java/jdk1.8.0_101/include/ -I /opt/java/jdk1.8.0_101/include/linux/ -I /usr/include/python2.7
https://github.com/hashdist/hashstack/pull/571/commits/9892646fbbda77ce0863322335e4eda966373840
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/java/jdk1.8.0_101/jre/lib/amd64/:/opt/java/jdk1.8.0_101/jre/lib/amd64/server
Activate a virtualenv
and install VTK (the python bindings).
Virtualenv is a pretty cool software that enables the creation of a python environment in a machine such that you don't mess with the system python.
Check this info out. However, it says to launch
python <path_to_vtk_build>/Wrapping/Python/setup.py install
but you need to launch that from within the <path_to_vtk_build>/Wrapping/Python/
directory and then launch
python setup.py install
Install the PyVE Python code. It is not very friendly, but you do it like this:
cp -rv pyve-code/PyVE/ pyve_env/lib/python2.7/site-packages
Copy the compiled PyVEViewer
cp java/vtkPyveViewer_5.10.1/bin/libvtkPyve.so pyve_env/lib/python2.7/site-packages/PyVE/vtk/ cp java/vtkPyveViewer_5.10.1/bin/libvtkPyvePython.so pyve_env/lib/python2.7/site-packages/PyVE/vtk/ cp java/vtkPyveViewer_5.10.1/bin/libvtkPyvePythonD.so pyve_env/lib/python2.7/site-packages/PyVE/vtk/
Add the right directories to the LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/java/jdk1.8.0_101/jre/lib/amd64:/opt/java/jdk1.8.0_101/jre/lib/amd64/server:/home/edo/software/PyVE/pyve_env/lib/python2.7/site-packages/VTK-5.10.1-py2.7.egg/vtk:/home/edo/software/PyVE/pyve_env/lib/python2.7/site-packages/PyVE/vtk:/home/edo/software/PyVE/VTK-5.10.1-bin_java/bin/
apt-get install python-pip pip install virtualenv virtualenv /home/edo/software/PyVE/pyve_env
source pyve_env/bin/activate
deactivate
deactivate rm -r pyve_env
apt-get install libgdcm-tools