I had posted some trouble I was having with getting VTK with Python wrapping working correctly in OS X Leopard (on pretty much a clean install of the OS).<div>After compiling with the following options:</div><div><br></div>
<div><span style="border-collapse:collapse;color:rgb(51, 51, 51)"><div>VTK_SHARED_LIBS: ON</div><div>VTK_USE_COCOA: OFF</div><div>VTK_USE_CARBON: OFF</div><div>VTK_USE_X: ON</div><div>VTK_USE_GUISUPPORT: ON</div>
<div>VTK_WRAP_PYTHON: ON</div><div><span style="font-size:10pt"><span style="font-family:arial, helvetica, sans-serif">CMAKE_INSTALL_PREFIX=/Users/preet/Development/VTKBin</span></span></div><div>OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib<br>
</div><div>OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include</div><div><br></div><div>I needed to set the environment variable DYLD_FALLBACK_LIBRARY_PATH since it was not pointing in the right location. I set the directory with:</div>
<div>export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/my/path/to/vtkinstall/lib/vtk-5.2<br></div><div><br></div></span></div><div><div><span style="border-collapse:collapse;color:rgb(51, 51, 51)"><div><div>
Doing this let the files resolve correctly and I'm able to type in 'import vtk' at a python interpreter with no issues. I tried to download a sample python file that displays a basic cube but I get the following error:</div>
<div><br></div><div><div>ircci-macpro12:vtk preetdesai$ python cube.py</div><div style="color:rgb(80, 0, 80)"><div>Traceback (most recent call last):</div></div><div> File "cube.py", line 15, in <module></div>
<div> mapper = vtk.vtkPolyDataMapper()</div><div>AttributeError: 'module' object has no attribute 'vtkPolyDataMapper'</div><div><br></div><div>I can confirm this file works fine on a similar linux (Ubuntu) install. Are there more things I need to set / change to get this working?</div>
<div><br></div><div><br></div><div>Regards,</div><div><br></div><div>-Preet</div></div></div></span></div></div>