ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

No module named tkinter

asked 2020-06-02 20:48:08 -0500

klastine gravatar image

updated 2020-06-03 18:40:05 -0500

I am trying to use tkinter in my ROS environment but I am having some trouble getting it set up. I added it to my 'packages.xml' file like this


but when I install the package with 'rosdep install [my package]', the node I have 'import tkinter' in still will not run, and instead returns 'ImportError: No module named tkinter'. I am relatively new to ROS and have not installed third party packages before so I'm not sure if I'm missing something. Thanks in advance for any help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-06-04 23:39:20 -0500

klastine gravatar image

Nevermind, I figured it out. I had to use 'import Tkinter' instead of 'import tkinter'.

edit flag offensive delete link more

answered 2022-03-21 11:04:40 -0500

aceirus gravatar image

I managed to resolve this by copying over all the tkinter folders from my working anaconda enviroment files to the ROS python directories like libs and site_packages. One particular one was the futures folder which has another tkinter folder 2 levels down.

I am using ROS Noetic on windows 11. Hope this helps others.

edit flag offensive delete link more


Copying installed artifacts is very fragile and is not recommended.

tfoote gravatar image tfoote  ( 2022-03-21 12:18:01 -0500 )edit

Question Tools

1 follower


Asked: 2020-06-02 20:48:08 -0500

Seen: 744 times

Last updated: Jun 04 '20