[vtkusers] Can't run build vtk from source with python wrappings

Jean-Christophe Fillion-Robin jcfr at kitware.com
Fri Oct 26 13:41:38 EDT 2018


Hi,

I see. As an alternative approach, you could also look into building VTK
python package using https://github.com/jcfr/VTKPythonPackage

This is what is used to build the VTK python wheels. That said, note that
we are are not yet officially supporting VTK python wheels.

Hth
Jc

On Fri, Oct 26, 2018 at 11:54 AM Evgeniya Malikova <evgenimalikova at gmail.com>
wrote:

> No, looks like updating DYLS_LIBRARY_PATH didn’t solve the problem.
>
> However, vtkpython works well. Just come across this description:
>
> https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython
>
> The similar check gives me similar list of dependencies with vtk python
> depending on libpython3.6m.dylib:
> otool -L libvtkCommonCorePython36D-8.2.1.dylib
> libvtkCommonCorePython36D-8.2.1.dylib:
> @rpath/libvtkCommonCorePython36D-8.2.1.dylib (compatibility version 1.0.0,
> current version 1.0.0)
> @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version
> 1.0.0, current version 1.0.0)
> @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current
> version 1.0.0)
> @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version
> 1.0.0)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
> 400.9.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 1252.0.0)
>
> otool -L vtkpython
> vtkpython:
> @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version
> 1.0.0, current version 1.0.0)
> @rpath/libvtkPythonInterpreter-8.2.1.dylib (compatibility version 1.0.0,
> current version 1.0.0)
> /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
> @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version
> 3.6.0)
> @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version
> 1.0.0)
> @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current
> version 1.0.0)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
> 400.9.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 1252.0.0)
>
> Best regards,
> Evgeniya
>
> On 26 Oct 2018, at 15:11, Jean-Christophe Fillion-Robin <jcfr at kitware.com>
> wrote:
>
> Hi,
>
> If you explicitly set or update DYLD_LIBRARY_PATH environment variable
> first with the path"
> /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/", are you able
> to import ?
>
> While sub-optimal, knowing that this work would provide good information.
>
> Jc
>
> On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova <
> evgenimalikova at gmail.com> wrote:
>
>> Forgot to add, main library files, like
>> libvtkCommonCorePython36-8.2.1.dylib are in
>> Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder.
>>
>> Best regards,
>> Evgeniya
>>
>> On 26 Oct 2018, at 13:23, Evgeniya Malikova <evgenimalikova at gmail.com>
>> wrote:
>>
>> Hello, I’m trying to run vtk with python wrappings build from source
>> https://gitlab.kitware.com/vtk/vtk.git. Target os - MacOs, python
>> version 3.6. The basic call of “import vtk” from python gives error that
>> libraries can’t be loaded (python program from
>> https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder):
>>
>>
>> Traceback (most recent call last):
>>   File
>> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py",
>> line 5, in <module>
>>     from .vtkCommonCorePython import *
>> ImportError:
>> dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so,
>> 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib
>>   Referenced from:
>> /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so
>>   Reason: image not found
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in
>> <module>
>>     import vtk
>>   File
>> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py",
>> line 7, in <module>
>>     from .vtkCommonCore import *
>>   File
>> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py",
>> line 9, in <module>
>>     from vtkCommonCorePython import *
>> ModuleNotFoundError: No module named ‘vtkCommonCorePython'
>>
>> This is the error with added path to
>> /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH
>> variable.
>>
>> Looks very much like libraries are found but can’t be loaded for some
>> reasons. Any suggestions what can cause such an error?
>>
>> Thank you very much in advance,
>> Best regards,
>> Evgeniya
>>
>>
>> _______________________________________________
>> 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://public.kitware.com/mailman/listinfo/vtkusers
>>
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181026/7f9147fc/attachment.html>


More information about the vtkusers mailing list