<div dir="ltr"><div><div><div>@Tom<br><br>I haven't looked at it at all yet but I have a hunch.I am wondering if this is an artifact of how, starting with El Captain, the system python is kind of locked down by be Apple. If that is the case, switching to a third party python (from fink, macports or homebrew) would solve it.<br></div><br></div><div>If not that, my next guess is that it is the library path management we do in the packaging process to make redistributable binaries that causes the problem. For windows and mac we do these things in different (platform specific) ways which would explain why it can be done on linux and windows but not mac.<br><br></div>In my personal use I either build vtk from source (most of my work) or run from the bin directory (for intro to vtk courses). However I really would like to get this nailed down. Likely then we can incorporate the binaries into a wheel and make "pip install vtk" just work. Unfortunately it is unknown when/if I'll find the time to investigate thoroughly (or solve it once I do eh?).<br><br></div><div>FWIW - to build the binaries we use this superbuild:<br><a href="https://gitlab.kitware.com/vtk/vtk-superbuild" target="_blank">https://gitlab.kitware.com/vtk/vtk-superbuild</a><br></div><div class="gmail_extra"><br clear="all"><div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div>
<br><div class="gmail_quote">On Wed, Jan 27, 2016 at 8:53 PM, Bernard Giroux <span dir="ltr"><<a href="mailto:listes.bgiroux@gmail.com" target="_blank">listes.bgiroux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
My results on el cap:<br>
<br>
I’ve got some home made modules, so I prefer to compile VTK myself.  I compile VTK after configuring this way (no mention about my modules here…)<br>
<br>
In a build directory:<br>
<br>
cmake -DCMAKE_BUILD_TYPE=Release \<br>
-DCMAKE_INSTALL_PREFIX=/usr/local/VTK-7.0.0.rc2 \<br>
-DVTK_WRAP_PYTHON=ON \<br>
-DCMAKE_MACOSX_RPATH=ON \<br>
-DCMAKE_INSTALL_NAME_DIR=/usr/local/VTK-7.0.0.rc2/lib /path/to/vtksource<br>
<br>
make<br>
sudo make install<br>
<br>
In /usr/local, I make a symbolic link pointing to the right directory:<br>
<br>
cd /usr/local<br>
sudo ln -s VTK-7.0.0.rc2 VTK<br>
<br>
Finally, in my $HOME/.bash_profile, I put<br>
<br>
export PYTHONPATH=/usr/local/VTK/lib/python2.7/site-packages<br>
<br>
<br>
FWIW, I run the macports version of python.<br>
<div><div><br>
<br>
<br>
<br>
> Le 27 janv. 2016 à 19:31, Tom Parker <<a href="mailto:tomparker@personaltelemetry.com" target="_blank">tomparker@personaltelemetry.com</a>> a écrit :<br>
><br>
> To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition.<br>
><br>
> VTK Python environment variables<br>
> C:\Python27\<br>
> C:\Python27\Scripts<br>
> C:\Software\VTK-7.0.0.rc2\bin\bin\Debug<br>
> C:\Software\VTK-7.0.0.rc2\bin\lib\Debug<br>
><br>
> PYTHONPATH<br>
><br>
> C:\Python27\lib<br>
> C:\Software\VTK-7.0.0.rc2\bin\bin\Debug<br>
> C:\Software\VTK-7.0.0.rc2\bin\lib\Debug<br>
> C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python<br>
> C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk<br>
><br>
> Now I can run python.exe and successfully import vtk.<br>
><br>
> And run all the python examples I’ve tested so far.<br>
><br>
> Regards,<br>
> Tom<br>
><br>
> From: vtkusers [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] On Behalf Of Tom Parker<br>
> Sent: Tuesday, January 26, 2016 4:25 PM<br>
> To: Meehan, Bernard <<a href="mailto:MEEHANBT@nv.doe.gov" target="_blank">MEEHANBT@nv.doe.gov</a>>; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
> Subject: Re: [vtkusers] vtkpython on mac os?<br>
><br>
> Thank you! I’ll test it and let everyone know if it works for me.<br>
><br>
> From: vtkusers [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] On Behalf Of Meehan, Bernard<br>
> Sent: Tuesday, January 26, 2016 2:41 PM<br>
> To: <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
> Subject: Re: [vtkusers] vtkpython on mac os?<br>
><br>
> This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it.<br>
><br>
> export VTK=~/VTK<br>
> export PATH=$PATH:$VTK/bin<br>
> export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages<br>
> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib<br>
><br>
><br>
> From:  vtkusers <<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>> on behalf of Tom Parker <<a href="mailto:tomparker@personaltelemetry.com" target="_blank">tomparker@personaltelemetry.com</a>><br>
> Date:  Tuesday, January 26, 2016 at 12:18 PM<br>
> To:  "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
> Subject:  [vtkusers] vtkpython on mac os?<br>
><br>
><br>
> Hello All,<br>
> I’ve download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I’ve fought with it for hours.<br>
> I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message “ImportError: No module named vtk”<br>
> After reading the docs, googling and reading the mailing lists I’ve tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy.<br>
> I have gotten it working on my linux systems before so I can’t imagine what I’m doing wrong.<br>
> Can anyone share a set of working path and environment variables with me?<br>
> Thank you,<br>
> Tom<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="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
_______________________________________________<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="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div></div>