<div dir="ltr"><div>Hi Giang,</div><div><br></div><div>The option VTK_Group_Tk:BOOL=ON must be set for Tkinter support.</div><div><br></div><div> - David</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 29, 2016 at 3:12 AM, Hoang Giang Bui <span dir="ltr"><<a href="mailto:hgbk2008@gmail.com" target="_blank">hgbk2008@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">Hello<div><br></div><div>I got an error when I tried to run a VTK python example with Tkinter enabled</div><div><br></div><div>I built VTK6.2.0 with Tcl/Tk 8.6.4 and Python 2.7.6. Executing the example</div><div>python {VTK_DIR}/Examples/Modelling/Python/SpherePuzzle.py<br></div><div><br></div><div>gives the error</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "SpherePuzzle.py", line 57, in <module></div><div> rw = vtkTkRenderWindowInteractor(f1, width=400, height=400, rw=renWin)</div><div> File "/home/hbui/opt/vtk-6.2.0/lib/python2.7/site-packages/vtk/tk/vtkTkRenderWindowInteractor.py", line 48, in __init__</div><div> vtkLoadPythonTkWidgets(<a href="http://master.tk" target="_blank">master.tk</a>)</div><div> File "/home/hbui/opt/vtk-6.2.0/lib/python2.7/site-packages/vtk/tk/vtkLoadPythonTkWidgets.py", line 81, in vtkLoadPythonTkWidgets</div><div> interp.call('load', filename, pkgname)</div><div>_tkinter.TclError: couldn't load file "<a href="http://libvtkRenderingPythonTkWidgets-6.2.so" target="_blank">libvtkRenderingPythonTkWidgets-6.2.so</a>": <a href="http://libvtkRenderingPythonTkWidgets-6.2.so" target="_blank">libvtkRenderingPythonTkWidgets-6.2.so</a>: cannot open shared object file: No such file or directory</div></div><div><br></div><div>The library <a href="http://libvtkRenderingPythonTkWidgets-6.2.so" target="_blank">libvtkRenderingPythonTkWidgets-6.2.so</a> is not installed to the target folder. I have checked that this library exist in VTK-5.10.1 but somehow it is removed in VTK-6.2.0</div><div><br></div><div>I looked into the vtkLoadPythonTkWidgets.py and I found out that the module name is required to load still has the same name</div><div>modname = 'vtkRenderingPythonTkWidgets'<br></div><div><br></div><div>Which means it is not updated or some configure flags need to be set to enable libvtkRenderingPythonTkWidgets</div><div><br></div><div>Any comments?</div><span class="HOEnZb"><font color="#888888"><div><br clear="all"><div><div><div dir="ltr">Giang</div></div></div>
</div></font></span></div>
</blockquote></div><br></div></div>