[vtkusers] vtkpython on mac os?
Bernard Giroux
listes.bgiroux at gmail.com
Wed Jan 27 20:53:00 EST 2016
Hi,
My results on el cap:
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…)
In a build directory:
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local/VTK-7.0.0.rc2 \
-DVTK_WRAP_PYTHON=ON \
-DCMAKE_MACOSX_RPATH=ON \
-DCMAKE_INSTALL_NAME_DIR=/usr/local/VTK-7.0.0.rc2/lib /path/to/vtksource
make
sudo make install
In /usr/local, I make a symbolic link pointing to the right directory:
cd /usr/local
sudo ln -s VTK-7.0.0.rc2 VTK
Finally, in my $HOME/.bash_profile, I put
export PYTHONPATH=/usr/local/VTK/lib/python2.7/site-packages
FWIW, I run the macports version of python.
> Le 27 janv. 2016 à 19:31, Tom Parker <tomparker at personaltelemetry.com> a écrit :
>
> 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.
>
> VTK Python environment variables
> C:\Python27\
> C:\Python27\Scripts
> C:\Software\VTK-7.0.0.rc2\bin\bin\Debug
> C:\Software\VTK-7.0.0.rc2\bin\lib\Debug
>
> PYTHONPATH
>
> C:\Python27\lib
> C:\Software\VTK-7.0.0.rc2\bin\bin\Debug
> C:\Software\VTK-7.0.0.rc2\bin\lib\Debug
> C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python
> C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk
>
> Now I can run python.exe and successfully import vtk.
>
> And run all the python examples I’ve tested so far.
>
> Regards,
> Tom
>
> From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Tom Parker
> Sent: Tuesday, January 26, 2016 4:25 PM
> To: Meehan, Bernard <MEEHANBT at nv.doe.gov>; vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkpython on mac os?
>
> Thank you! I’ll test it and let everyone know if it works for me.
>
> From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard
> Sent: Tuesday, January 26, 2016 2:41 PM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkpython on mac os?
>
> 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.
>
> export VTK=~/VTK
> export PATH=$PATH:$VTK/bin
> export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages
> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib
>
>
> From: vtkusers <vtkusers-bounces at vtk.org> on behalf of Tom Parker <tomparker at personaltelemetry.com>
> Date: Tuesday, January 26, 2016 at 12:18 PM
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Subject: [vtkusers] vtkpython on mac os?
>
>
> Hello All,
> 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.
> 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”
> 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.
> I have gotten it working on my linux systems before so I can’t imagine what I’m doing wrong.
> Can anyone share a set of working path and environment variables with me?
> Thank you,
> Tom
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list