[vtkusers] Problem with loading libvtkRenderingPythonTkWidgets.dylib
Eric E. Monson
emonson at cs.duke.edu
Thu Jun 10 10:03:59 EDT 2010
Hey Miguel,
Are you sure it's really looking for the library in /usr/local/lib/vtk-5.6/ ? On my OS X build the Python.so libraries in the site-packages VTK egg really look in my build/bin directory. Have you tried running "otool -L" on the .so library? If you have built VTK with VTK_USE_RPATH: OFF, then it will just list libvtkRenderingPythonTkWidgets.dylib with no absolute path before it, and thus will not be able to find it. If it has a path, then that's where it's really looking for it, and you can check if it's there. If you haven't, I would recommend building on OS X with VTK_USE_RPATH: ON so the system has an easier time finding the libraries it needs.
I don't build with Tcl/Tk wrapping on, so maybe I'm off-base on this, but it's worth a try. You really shouldn't have to add any extra paths if the Python wrappers have been built and installed correctly.
Talk to you later,
-Eric
On Jun 10, 2010, at 3:22 AM, Miguel Ortiz Lombardia wrote:
> Hi,
>
> I have installed VTK-5.6 on a 64bit OSX 10.6.3 machine with Tcl,Tk and Python wrappers. When trying to use one application that requires VTK I get this error:
>
> File "/Users/mol/tmp/veda/VEDA/mod/gfx.py", line 94, in setenv
> self.iren = vtkTkRenderWindowInteractor(root,rw=self.renwin, width=1000, height=800)
> File "/usr/local/lib/python2.6/site-packages/VTK-5.6.0-py2.6.egg/vtk/tk/vtkTkRenderWindowInteractor.py", line 48, in __init__
> vtkLoadPythonTkWidgets(master.tk)
> File "/usr/local/lib/python2.6/site-packages/VTK-5.6.0-py2.6.egg/vtk/tk/vtkLoadPythonTkWidgets.py", line 70, in vtkLoadPythonTkWidgets
> interp.call('load', filename)
> _tkinter.TclError: dlopen(libvtkRenderingPythonTkWidgets.dylib, 10): image not found
>
> I looked into /usr/local/lib/python2.6/site-packages/VTK-5.6.0-py2.6.egg/vtk/tk/vtkLoadPythonTkWidgets.py and found that the path where the vtk libraries were installed ( /usr/local/lib/vtk-5.6/ ) was not included in the pathlist. So I modified vtkLoadPythonTkWidgets.py accordingly :
>
> if os.name == 'posix':
> pathlist.append('/usr/local/lib/vtk-5.6')
>
> I checked (via print) that the "interp.eval('catch {load '+fullpath+' '+pkgname+'}')" construction was correctly built, and it was. I also checked, of course, that the libvtkRenderingPythonTkWidgets.dylib was where I was looking for it and that it contains Vtkrenderingpythontkwidgets (via strings).
>
> But I keep getting the same error. I would appreciate if anyone can suggest what is going on here.
>
> Best wishes,
>
>
> -- Miguel
>
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list