[vtkusers] Compiling VTK Python from source

ashwin .D winash12 at gmail.com
Thu Mar 8 06:45:51 EST 2018


Hello,
           I have VTK 7.0.0 tar file and I am trying to compile from source
the python wrapper for VTK. I have ccmake installed on my Ubuntu 16.04 box
but no matter what I try(the installation itself proceeds with no errors)
but I cannot find out where the python wrapper for SDK is present. When I
type

python3.5  import vtk

I get ImportError : no module named 'vtk`

Here is how I built VTK for python using ccmake


ccmake -DCMAKE_INSTALL_PREFIX=/opt/local/vtk7.0-py3.5.0
-DBUILD_SHARED_LIBS:BOOL=ON-DVTK_WRAP_PYTHON:BOOL=ON
-DVTK_PYTHON_VERSION:STRING=3.5 -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3.5
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5
-DPYTHON_LIBRARY:PATH=/usr/local/lib/python3.5/ ..VTK-7.0.0

Then a ccmake window pops up and I type ctcl - c twice and ctrl-g once. But
this does not do the job.

Any suggestions will be appreciated. I intend to use VTK with Mayavi
eventually.

Best regards,
Ashwin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180308/6c830481/attachment.html>


More information about the vtkusers mailing list