# Error importing vtkTkRenderWindowInteractor in vtk 8.2.0

**URL:** https://discourse.vtk.org/t/error-importing-vtktkrenderwindowinteractor-in-vtk-8-2-0/856
**Category:** Support
**Created:** [April 27, 2019, 1:12pm UTC](https://discourse.vtk.org/t/error-importing-vtktkrenderwindowinteractor-in-vtk-8-2-0/856 "2019-04-27T13:12:23Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [May 7, 2019, 8:02pm UTC](https://discourse.vtk.org/t/error-importing-vtktkrenderwindowinteractor-in-vtk-8-2-0/856/27 "2019-05-07T20:02:24Z")

</div>

Change the cmake settings so that VTK uses the same libtcl and libtk that \_tkinter links to (of course, make sure that VTK uses the tcl/tk include directories that match those same libraries!)

The output from otool shows that \_tkinter links to `@rpath/libtk8.6.dylib`, and it will also show what `LC_RPATH` is set to, so that will give you the full path to libtk8.6.dylib and libtcl8.6.dylib.

After rebuilding, you might also have to set the `LC_RPATH` in libvtkRenderingPythonTkWidgets-8.2.dylib so that it matches the `LC_RPATH` used by the anaconda \_tkinter. On OS X, the program `install_name_tool` can be used to manipulate paths that are embedded within libraries and executables.

Do a google of “dylib rpath” for an introduction to the wonderful world of rpaths and how they can be used.

---

_[View the full topic](https://discourse.vtk.org/t/error-importing-vtktkrenderwindowinteractor-in-vtk-8-2-0/856)._
