If I ignore the warnings and go ahead and build, it builds only bindings for 2.7 (in VTK-8.2.0.build/lib/python2.7, nothing for 3.5)
Any idea what’s going on, and how can I fix this? Alternatively, is there a wheel somewhere for VTK 8.2 and python 3.5 for ubuntu 16.04? The pip3 version of VTK is 8.1.x, which I had to hack to make it work with PySide2, but 8.2 should have that fixed that’s why I’m trying to install it.
Another note (for some this is obvious, but I’m sure many noobs like me with find this helpful):
I had to also set PYTHONPATH to make ‘import vtk’ work: ‘sudo make install’ puts the package in ‘/usr/local/lib/python3.5/site-packages’, which is not in the search path for imports. Under ubuntu (and other distributions derived from debian), we find instead ‘/usr/local/lib/python3.5/dist-packages’, which is the destination for packages installed by pip(3). I’ve done this by adding this line to /etc/environment:
I would be cautious with manual installation of VTK python modules to *buntu’s dist-packages though. That is reserved for things installed through Ubuntu packages. I would install VTK as a whole to a non-system-wide prefix and point PYTHONPATH / LD_LIBRARY_PATH there.