Archive for April, 2016

“import tkinter” fails

April 27, 2016 Leave a comment

Under Manjaro I wanted to use the turtle module but I got this error:

File "", line 1, in <module>
    import turtle
  File "/usr/lib/python2.7/lib-tk/", line 107, in <module>
    import Tkinter as TK
  File "/usr/lib/python2.7/lib-tk/", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: cannot open shared object file: No such file or directory


sudo pacman -S tk

Ubuntu 14.04
I had the same problem under Ubuntu when I tried to use matplotlib on a remote server.

sudo apt install python3-tk
Categories: python, ubuntu Tags: , , ,