[vtkusers] Compiling VTK Python from source

ashwin .D winash12 at gmail.com
Thu Mar 8 09:23:27 EST 2018


Thanks for your response. I was not sure really and I did a make clean
again and this time ran cmake as opposed to ccmake. and  I am getting a few
undefined references and they are related to Python. I have enclosed the
log file. Any suggestions will be appreciated.

On Thu, Mar 8, 2018 at 7:34 PM, Aron Helser <aron.helser at kitware.com> wrote:

> 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/a8dafd69/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logs
Type: application/octet-stream
Size: 186117 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180308/a8dafd69/attachment-0001.obj>


More information about the vtkusers mailing list