[vtkusers] Cannot build vtk for python3 on Ubuntu 16.04

Charles Kind charles.kind at bristol.ac.uk
Thu Dec 21 05:49:47 EST 2017

I am running ubuntu 16.04. I build vtk with VTK_PYTHON_VERSION=3 and
VTK_WRAP_PYTHON=ON. Once built and installed it only runs from the system
Python 2.7.12. Even if I run vtkpython I get:

*******@********:~/Downloads/a/vtkBuild$ vtkpython
vtk version 8.0.1
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'vtk'


I do have Enthought Canopy on the same system, running VTK from python 3.5,
but not running when I do the ccmake, make and install for vtk8.0.1. Could
this be the problem, I am a little fearful of removing it right now as I am
producing work for an imminent paper and need my code working.

Thanks in advance for any help.

Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html

More information about the vtkusers mailing list