<div dir="ltr">Hi Eric,<div><br></div><div>Thanks for the info.</div><div><br></div><div>Out of curiosity, what happens when you run programs with VTK's</div><div>own vtkpython executable?  I'm guessing that would work, since it</div><div>isn't a "restricted binary".</div><div><br></div><div>About the rpaths, I'm a little surprised they are still in the .so files,</div><div>because a "make install" should clear away the rpaths unless the</div><div>files are being installed into a bundle.</div><div><br></div><div> - David</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 5:53 AM, Eric Nodwell <span dir="ltr"><<a href="mailto:eric.nodwell@numerics88.com" target="_blank">eric.nodwell@numerics88.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For VTK 6.3.0 in OS X 10.11 El Capitan, if you are compiling VTK<br>
yourself, it is no longer possible to link against the system python.<br>
This is due to the new System Integrity Protection. The system python<br>
is a protected location in OS 10.11, and SIP is very strict about what<br>
can be linked, and how, to restricted programs. Although the build<br>
will succeed, this is what happens when you attempt to load VTK in<br>
python:<br>
<br>
$ python<br>
<br>
Python 2.7.10 (default, Aug 22 2015, 20:33:39)<br>
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import vtk<br>
Traceback (most recent call last):<br>
  File "<stdin>", line 1, in <module><br>
  File "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/__init__.py",<br>
line 39, in <module><br>
    from vtkCommonCore import *<br>
  File "/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCore.py",<br>
line 1, in <module><br>
    from vtkCommonCorePython import *<br>
ImportError: dlopen(/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so,<br>
2): Library not loaded: libvtkCommonCorePython27D-6.3.1.dylib<br>
  Referenced from:<br>
/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so<br>
  Reason: unsafe use of relative rpath<br>
libvtkCommonCorePython27D-6.3.1.dylib in<br>
/Users/Shared/install/vtk-6.3.0/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so<br>
with restricted binary<br>
<br>
The easiest solution is to use python from <a href="http://python.org" rel="noreferrer" target="_blank">python.org</a> . For those<br>
unsure, here are the relevant CMake variables to build VTK against the<br>
<a href="http://python.org" rel="noreferrer" target="_blank">python.org</a> python (if multiple pythons are installed, CMake tends to<br>
find the system python libraries):<br>
<br>
PYTHON_EXECUTABLE<br>
/Library/Frameworks/Python.framework/Versions/2.7/bin/python<br>
PYTHON_INCLUDE_DIR<br>
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7<br>
PYTHON_LIBRARY<br>
/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib<br>
<br>
Eric<br></blockquote></div></div></div></div>