<div dir="ltr">Hi Jens,<div><br></div><div>I'll have a look at this.</div><div><br></div><div>Thanks for reporting the problem.</div><div><br></div><div>Goodwin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 14, 2014 at 12:29 PM, Jens <span dir="ltr"><<a href="mailto:linucks42@gmail.com" target="_blank">linucks42@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.7272720336914px">Hi,</span><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I downloaded the latest vtkpython bundle for OSX:</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><a href="http://www.vtk.org/files/release/6.1/vtkpython-6.1.0-Darwin-64bit.tar.gz" target="_blank">http://www.vtk.org/files/release/6.1/vtkpython-6.1.0-Darwin-64bit.tar.gz</a><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">and am trying to use it with Tk.</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I've tried to create the simplest script I can to illustrate the problem, which I've pasted in below.</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I run the script using the vtkpython binary.</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px">I firstly have to add the path to the vtk .so files to the python system path or the script fails with:</div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><p>    import vtk.tk.vtkTkRenderWidget</p><p>  File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", line 51, in <module></p><p>    from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets</p><p>  File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", line 2, in <module></p><p>    import vtkCommonCorePython</p><p>ImportError: No module named vtkCommonCorePython</p><p><br></p><p>Firstly, shouldn't vtkpython already do this, or am I using it incorrectly?</p><p><br></p><p>If I add the path with the sys.insert... line, the script then fails with:</p><p><br></p><p>    pane = vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) </p><p>  File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkTkRenderWidget.py", line 81, in __init__</p><p>    vtkLoadPythonTkWidgets(<a href="http://master.tk/" target="_blank">master.tk</a>)</p><p>  File "/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk/tk/vtkLoadPythonTkWidgets.py", line 73, in vtkLoadPythonTkWidgets</p><p>    interp.call('load', filename, pkgname)</p><p></p><p>_tkinter.TclError: dlopen(libvtkRenderingPythonTkWidgets-6.1.dylib, 10): image not found</p><p><br></p><p>I've looked and the libvtkRenderingPythonTkWidgets-6.1.dylib library is nowhere to be found.</p><p><br></p><p>Is it missing from the package, or is something else going on?</p><p><br></p><p>Best wishes,</p><p><br></p><p>Jens</p></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7272720336914px"><p>import sys</p><p><br></p><p># Need to add this manually </p><p>sys.path.insert(0,"/opt/VTK-6.1.0-Darwin-64bit/vtkpython/bin/vtk")</p><p><br></p><p>import vtk</p><p>import Tkinter</p><p>import vtk.tk.vtkTkRenderWidget</p><p><br></p><p># create root window </p><p>root = Tkinter.Tk() </p><p><br></p><p># create vtkTkRenderWidget </p><p>pane = vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root,width=300,height=300) </p><p><br></p><p>ren = vtk.vtkRenderer() </p><p>renWin = pane.GetRenderWindow() </p><p>renWin.AddRenderer(ren) </p><p><br></p><p># pack the pane into the tk root </p><p>pane.pack() </p></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>