[vtkusers] VTK+Python on Mac OS X - no module named vtk error in Python

David Gobbi david.gobbi at gmail.com
Sat Jun 6 09:56:28 EDT 2015


Hi Prashanth,

The LD_LIBRARY_PATH variable is ignored on OS X, use DYLD_LIBRARY_PATH
instead.  This is how the variables are set on my system:

export PATH=/Volumes/Work/Kitware/vtk-build/bin:$PATH
export DYLD_LIBRARY_PATH=/Volumes/Work/Kitware/vtk-build/bin
export
PYTHONPATH=/Volumes/Work/Kitware/vtk-build/Wrapping/Python:/Volumes/Work/Kitware/vtk-build/lib
export TCLLIBPATH=/Volumes/Work/Kitware/vtk-build/Wrapping/Tcl/

 - David


On Sat, Jun 6, 2015 at 7:07 AM, Prashanth <prashanth.dumpuri at gmail.com>
wrote:

> All,
>
> I'm trying to use Python Wrapping for VTK on Mac OS. I'm running Mac OS X
> 10.10.3 and used cmake 3.2.2, XCode 6.3.2, Python 2.7, VTK-6.2 to build
> VTK. (I made sure Shared libraries and Python wrapping were turned on
> during cmake process).
>
> Everything built fine but I get '*No module named vtk*' error when I try
> to 'import vtk' in a python shell. Below are my .bash_profile variables
>
> ---------------------------------------------------------
> export PATH=
> ~/MyPrograms/VTK-6.2.0-Build/lib/:~/MyPrograms/VTK-6.2.0-Build/bin:$PATH
>
> export
> PYTHONPATH=~/MyPrograms/VTK-6.2.0/Wrapping/Python:~/MyPrograms/VTK-6.2.0-Build/bin
>
> export LD_LIBRARY_PATH=~/MyPrograms/VTK-6.2.0-Build/lib/
>
> export DYLD_FALLBACK_LIBRARY_PATH=~/MyPrograms/VTK-6.2.0-Build/bin/
>
> ---------------------------------------------------------
>
> Can someone please help me fix this error?
>
> Prashanth
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150606/2f4eb2da/attachment.html>


More information about the vtkusers mailing list