[vtkusers] Missing libvtkRenderingPythonTkWidgets on OSX

Goodwin Lawlor goodwin.lawlor.lists at gmail.com
Mon Sep 15 08:25:03 EDT 2014


Hi Jens,

I'll have a look at this.

Thanks for reporting the problem.

Goodwin

On Sun, Sep 14, 2014 at 12:29 PM, Jens <linucks42 at gmail.com> wrote:

> Hi,
>
> I downloaded the latest vtkpython bundle for OSX:
>
> http://www.vtk.org/files/release/6.1/vtkpython-6.1.0-Darwin-64bit.tar.gz
>
> and am trying to use it with Tk.
>
> I've tried to create the simplest script I can to illustrate the problem,
> which I've pasted in below.
>
> I run the script using the vtkpython binary.
>
> I firstly have to add the path to the vtk .so files to the python system
> path or the script fails with:
>
>     import vtk.tk.vtkTkRenderWidget
>
>   File
> "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py",
> line 51, in <module>
>
>     from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets
>
>   File
> "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py",
> line 2, in <module>
>
>     import vtkCommonCorePython
>
> ImportError: No module named vtkCommonCorePython
>
>
> Firstly, shouldn't vtkpython already do this, or am I using it incorrectly?
>
>
> If I add the path with the sys.insert... line, the script then fails with:
>
>
>     pane =
> vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300)
>
>   File
> "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py",
> line 81, in __init__
>
>     vtkLoadPythonTkWidgets(master.tk)
>
>   File
> "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py",
> line 73, in vtkLoadPythonTkWidgets
>
>     interp.call('load', filename, pkgname)
>
> _tkinter.TclError: dlopen(libvtkRenderingPythonTkWidgets-6.1.dylib, 10):
> image not found
>
>
> I've looked and the libvtkRenderingPythonTkWidgets-6.1.dylib library is
> nowhere to be found.
>
>
> Is it missing from the package, or is something else going on?
>
>
> Best wishes,
>
>
> Jens
>
>
>
> import sys
>
>
> # Need to add this manually
>
> sys.path.insert(0,"/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk")
>
>
> import vtk
>
> import Tkinter
>
> import vtk.tk.vtkTkRenderWidget
>
>
> # create root window
>
> root = Tkinter.Tk()
>
>
> # create vtkTkRenderWidget
>
> pane =
> vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300)
>
>
> ren = vtk.vtkRenderer()
>
> renWin = pane.GetRenderWindow()
>
> renWin.AddRenderer(ren)
>
>
> # pack the pane into the tk root
>
> pane.pack()
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140915/11de0843/attachment.html>


More information about the vtkusers mailing list