<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Isaiah, <div class=""><br class=""></div><div class="">Thanks for the response!</div><div class=""><br class=""></div><div class=""><div class="">I've pasted below the output from running python3, vtkpython, and both of those commands under lldb.  I've never used vmmap before, so I'm not sure how to attach to the process after it crashes, and running vmmap on a running vtkpython, before importing vtk, doesn't show anything that seems out of the ordinary (see output at <a href="https://pastebin.com/j5ANwNpv" class="">https://pastebin.com/j5ANwNpv</a>).</div><div class=""><br class=""></div><div class="">I'm not sure where to go from here as I get different results under lldb and different lldb output for running python3 and vtkpython.  I've also tried vtk-7.0.0 but I get the same results, just with "-7.0.0.dylib".</div><div class=""><br class=""></div><div class="">All of the image files that weren't found do exist on the system:</div><div class=""><br class=""></div><div class="">> find /Users/jkempinger/build -iname "libvtkCommonCorePython35D-7.1.1.dylib" -exec ls -l '{}' \;</div><div class="">-rwxr-xr-x  1 jkempinger  staff  2964960 Apr 10 09:46 /Users/jkempinger/build/lib/libvtkCommonCorePython35D-7.1.1.dylib</div><div class="">> find /Users/jkempinger/build -iname "libvtkWrappingPython35Core-7.1.1.dylib" -exec ls -l '{}' \;</div><div class="">-rwxr-xr-x  1 jkempinger  staff  3052644 Apr 10 09:46 /Users/jkempinger/build/lib/libvtkWrappingPython35Core-7.1.1.dylib</div><div class=""><br class=""></div><div class="">and I believe my environment is set correctly:</div><div class=""><br class=""></div><div class="">> echo $DYLD_LIBRARY_PATH</div><div class="">/Users/jkempinger/build/lib:/Users/jkempinger/build/Qt5.7.0/5.7/clang_64/lib</div><div class="">> echo $LD_LIBRARY_PATH</div><div class="">/Users/jkempinger/build/lib:/Users/jkempinger/build/Qt5.7.0/5.7/clang_64/lib</div><div class="">> echo $PYTHONPATH</div><div class="">/Users/jkempinger/build/lib/python3.5/site-packages</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When running python3:</div><div class=""><br class=""></div><div class="">Python 3.5.2 (default, Apr  7 2017, 11:18:59)</div><div class="">[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin</div><div class="">Type "help", "copyright", "credits" or "license" for more information.</div><div class="">>>> import vtk</div><div class="">Fatal Python error: PyThreadState_Get: no current thread</div><div class="">zsh: abort      /Users/jkempinger/build/bin/python3</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When running vtkpython:</div><div class=""><br class=""></div><div class="">vtk version 7.1.1</div><div class="">Python 3.5.2 (default, Apr  7 2017, 11:18:59)</div><div class="">[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin</div><div class="">Type "help", "copyright", "credits" or "license" for more information.</div><div class="">>>> import vtk</div><div class="">Fatal Python error: PyThreadState_Get: no current thread</div><div class="">zsh: abort      /Users/jkempinger/build/bin/vtkpython</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When running python3 under lldb and importing vtk:</div><div class=""><br class=""></div><div class="">(lldb) target create "/Users/jkempinger/build/bin/python3"</div><div class="">Current executable set to '/Users/jkempinger/build/bin/python3' (x86_64).</div><div class="">(lldb) run</div><div class="">Process 48987 launched: '/Users/jkempinger/build/bin/python3' (x86_64)</div><div class="">Python 3.5.2 (default, Apr  7 2017, 11:18:59)</div><div class="">[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin</div><div class="">Type "help", "copyright", "credits" or "license" for more information.</div><div class="">>>> import vtk</div><div class="">Traceback (most recent call last):</div><div class="">  File "/Users/jkempinger/build/lib/python3.5/site-packages/vtk/vtkCommonCore.py", line 5, in <module></div><div class="">    from .vtkCommonCorePython import *</div><div class="">ImportError: dlopen(/Users/jkempinger/build/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: libvtkCommonCorePython35D-7.1.1.dylib</div><div class="">  Referenced from: /Users/jkempinger/build/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so</div><div class="">  Reason: image not found</div><div class=""><br class=""></div><div class="">During handling of the above exception, another exception occurred:</div><div class=""><br class=""></div><div class="">Traceback (most recent call last):</div><div class="">  File "<stdin>", line 1, in <module></div><div class="">  File "/Users/jkempinger/build/lib/python3.5/site-packages/vtk/__init__.py", line 41, in <module></div><div class="">    from .vtkCommonCore import *</div><div class="">  File "/Users/jkempinger/build/lib/python3.5/site-packages/vtk/vtkCommonCore.py", line 9, in <module></div><div class="">    from vtkCommonCorePython import *</div><div class="">ImportError: No module named 'vtkCommonCorePython'</div><div class="">>>></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">When running vtkpython in lldb:</div><div class=""><br class=""></div><div class="">(lldb) target create "/Users/jkempinger/build/bin/vtkpython"</div><div class="">Current executable set to '/Users/jkempinger/build/bin/vtkpython' (x86_64).</div><div class="">(lldb) run</div><div class="">Process 49021 launched: '/Users/jkempinger/build/bin/vtkpython' (x86_64)</div><div class="">dyld: Library not loaded: libvtkWrappingPython35Core-7.1.1.dylib</div><div class="">  Referenced from: /Users/jkempinger/build/bin/vtkpython</div><div class="">  Reason: image not found</div><div class="">Process 49021 stopped</div><div class="">* thread #1, stop reason = signal SIGABRT</div><div class="">    frame #0: 0x00000001000359ee dyld`__abort_with_payload + 10</div><div class="">dyld`__abort_with_payload:</div><div class="">->  0x1000359ee <+10>: jae    0x1000359f8               ; <+20></div><div class="">    0x1000359f0 <+12>: movq   %rax, %rdi</div><div class="">    0x1000359f3 <+15>: jmp    0x100035300               ; cerror_nocancel</div><div class="">    0x1000359f8 <+20>: retq</div><div class="">(lldb) image list</div><div class="">[  0] 08649D04-B82E-328E-AD4C-CA3C421293E5 0x0000000100000000 /Users/jkempinger/build/bin/vtkpython</div><div class="">[  1] 8239D0D7-66F6-3C44-A77F-586F74525DA3 0x000000010000c000 /usr/lib/dyld</div><div class="">(lldb)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Any suggestions on what to try next?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Jayson</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Apr 7, 2017, at 10:45 PM, Isaiah Norton <<a href="mailto:isaiah.norton@gmail.com" class="">isaiah.norton@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">You could debug with vmmap, to see which shared libraries are loaded in the process.<div class="">Or start under lldb and look at output of `image list` when it aborts.</div><div class=""><br class=""></div><div class="">Isaiah</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Apr 7, 2017 at 4:26 PM, Jayson Kempinger <span dir="ltr" class=""><<a href="mailto:jkempinger@decisionvis.com" target="_blank" class="">jkempinger@decisionvis.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I’m trying to install VTK on an iMac running 10.12.  I’m using python 3.5.2, compiled from source, and am compiling VTK-7.1.1 from source.<br class="">
<br class="">
When I run python3 (with -v and -d) and try to import vtk python crashes with the following error:<br class="">
<br class="">
>>> import vtk<br class="">
# /Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/__<wbr class="">pycache__/__init__.cpython-35.<wbr class="">pyc matches /Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/__<wbr class="">init__.py<br class="">
# code object from '/Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/__<wbr class="">pycache__/__init__.cpython-35.<wbr class="">pyc'<br class="">
# /Users/username/build/lib/<wbr class="">python3.5/__pycache__/__<wbr class="">future__.cpython-35.pyc matches /Users/username/build/lib/<wbr class="">python3.5/__future__.py<br class="">
# code object from '/Users/username/build/lib/<wbr class="">python3.5/__pycache__/__<wbr class="">future__.cpython-35.pyc'<br class="">
import '__future__' # <_frozen_importlib_external.<wbr class="">SourceFileLoader object at 0x1073032e8><br class="">
# /Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/__<wbr class="">pycache__/vtkCommonCore.<wbr class="">cpython-35.pyc matches /Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/<wbr class="">vtkCommonCore.py<br class="">
# code object from '/Users/username/build/lib/<wbr class="">python3.5/site-packages/vtk/__<wbr class="">pycache__/vtkCommonCore.<wbr class="">cpython-35.pyc'<br class="">
Fatal Python error: PyThreadState_Get: no current thread<br class="">
zsh: abort      python3 -v -d<br class="">
<br class="">
From what I’ve read online it sounds like this is due to a python mismatch, i.e. building VTK against a different python version than the version it is run under.  I’ve searched through the advanced cmake configuration and can’t find any reference to the system built-in python2 interpreter.<br class="">
<br class="">
Any suggestions on what might be going wrong?<br class="">
<br class="">
Thanks!<br class="">
Jayson<br class="">
______________________________<wbr class="">_________________<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank" class="">http://www.vtk.org/Wiki/VTK_<wbr class="">FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank" class="">http://markmail.org/search/?q=<wbr class="">vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank" class="">http://public.kitware.com/<wbr class="">mailman/listinfo/vtkusers</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>