duckietown / duckietown-slimremote

Low-overhead low-latency high-frequency remote control library for the robot via ZMQ and OpenCV
Other
3 stars 9 forks source link

ImportError: No module named '_tkinter' #11

Open AleksandarPetrov opened 6 years ago

AleksandarPetrov commented 6 years ago

Trying to run

docker run -it \
    --entrypoint=qemu-arm-static \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    duckietown/duckietown-slimremote /bin/sh -c "python tests/12-test-keyboard-controller.py"

on my computer resulted in

Traceback (most recent call last):
  File "tests/12-test-keyboard-controller.py", line 2, in <module>
    from duckietown_slimremote.pc.robot import KeyboardControlledRobot
  File "/duckietown-slimremote/duckietown_slimremote/pc/robot.py", line 2, in <module>
    from PIL import ImageTk, Image
  File "/usr/local/lib/python3.4/site-packages/PIL/ImageTk.py", line 31, in <module>
    import tkinter
  File "/usr/local/lib/python3.4/tkinter/__init__.py", line 38, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'
fgolemo commented 6 years ago

Heya, yeah sorry about that. That's mostly a bug in the documentation. You're not actually supposed to run the keyboard control in a container. Could you try installing the duckietown-slimremote on your local machine and run the keybaord control script through that? Update to the documentation coming soon.