[vtkusers] Compiling VTK Python from source
Aron Helser
aron.helser at kitware.com
Thu Mar 8 09:04:33 EST 2018
Do you have a 'vtkpython.exe' in your build/bin directory? That means that
you have successfully compiled the wrappers. If you run 'vtkpython' and
then 'import vtk', it should work.
vtkpython is basically a thin wrapper that sets up paths so that 'iimport
vtk' works.
This wiki: https://www.paraview.org/Wiki/ParaView/Python_Scripting has some
info on how to set environment vars so you can run python and import vtk or
paraview without using vtkpython/pvpython.
HTH,
Aron
On Thu, Mar 8, 2018 at 6:45 AM, ashwin .D <winash12 at gmail.com> wrote:
> 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.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180308/a5960357/attachment.html>
More information about the vtkusers
mailing list