<div dir="ltr"><div dir="ltr"><div>Hi, <br></div><div><br></div><div>I see. As an alternative approach, you could also look into building VTK python package using <a href="https://github.com/jcfr/VTKPythonPackage">https://github.com/jcfr/VTKPythonPackage</a></div><div><br></div><div>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.<br></div><div><br></div><div>Hth</div><div>Jc<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 26, 2018 at 11:54 AM Evgeniya Malikova <<a href="mailto:evgenimalikova@gmail.com">evgenimalikova@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">No, looks like updating DYLS_LIBRARY_PATH didn’t solve the problem.<div><br></div><div>However, vtkpython works well. Just come across this description:</div><div><a href="https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython" target="_blank">https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython</a></div><div><br></div><div>The similar check gives me similar list of dependencies with vtk python depending on libpython3.6m.dylib:</div><div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">otool -L libvtkCommonCorePython36D-8.2.1.dylib</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">libvtkCommonCorePython36D-8.2.1.dylib:</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">   </span>@rpath/libvtkCommonCorePython36D-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">      </span>@rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">     </span>@rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">       </span>@rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">      </span>/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap"> </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">otool -L vtkpython</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">vtkpython:</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">      </span>@rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">     </span>@rpath/libvtkPythonInterpreter-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">        </span>/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">    </span>@rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">        </span>@rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">      </span>@rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap">       </span>/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)</span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span class="m_953021438799216062Apple-tab-span" style="white-space:pre-wrap"> </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)</span></div></span></div><div><br></div><div>Best regards,</div><div>Evgeniya<br><div><br><blockquote type="cite"><div>On 26 Oct 2018, at 15:11, Jean-Christophe Fillion-Robin <<a href="mailto:jcfr@kitware.com" target="_blank">jcfr@kitware.com</a>> wrote:</div><br class="m_953021438799216062Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div>Hi, <br></div><div><br></div><div>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 ?</div><div><br></div><div>While sub-optimal, knowing that this work would provide good information.</div><div><br></div><div>Jc<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova <<a href="mailto:evgenimalikova@gmail.com" target="_blank">evgenimalikova@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Forgot to add, main library files, like libvtkCommonCorePython36-8.2.1.dylib are in Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder.<div><br></div><div>Best regards,</div><div>Evgeniya<br><div><br><blockquote type="cite"><div>On 26 Oct 2018, at 13:23, Evgeniya Malikova <<a href="mailto:evgenimalikova@gmail.com" target="_blank">evgenimalikova@gmail.com</a>> wrote:</div><br class="m_953021438799216062m_-6178899952954180551Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space">Hello, I’m trying to run vtk with python wrappings build from source <a href="https://gitlab.kitware.com/vtk/vtk.git" target="_blank">https://gitlab.kitware.com/vtk/vtk.git</a>. 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 <a href="https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder" target="_blank">https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder</a>):<div><br></div><div><br></div><div><div>Traceback (most recent call last):</div><div>  File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in <module></div><div>    from .vtkCommonCorePython import *</div><div>ImportError: dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib</div><div>  Referenced from: /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so</div><div>  Reason: image not found</div><div><br></div><div>During handling of the above exception, another exception occurred:</div><div><br></div><div>Traceback (most recent call last):</div><div>  File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in <module></div><div>    import vtk</div><div>  File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 7, in <module></div><div>    from .vtkCommonCore import *</div><div>  File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in <module></div><div>    from vtkCommonCorePython import *</div><div>ModuleNotFoundError: No module named ‘vtkCommonCorePython'</div></div><div><br></div><div>This is the error with added path to /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH variable.</div><div><br></div><div>Looks very much like libraries are found but can’t be loaded for some reasons. Any suggestions what can cause such an error?</div><div><br></div><div>Thank you very much in advance,</div><div>Best regards,</div><div>Evgeniya</div><div><br></div></div></div></blockquote></div><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>
</div></blockquote></div><br></div></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>