-1

When I run import tkinter I get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Ruuning apt-get install python3-tk doesn't sove this issue.

Running Python 3.9 on Debian Experimental

  • Pick one from: [`"No module named '_tkinter'"`](https://stackoverflow.com/search?q=isanswered%3Ayes+is%3Aquestion+%5Bpython%5D%5Btkinter%5D+%22No+module+named+%27_tkinter%27%22) – stovfl Jan 13 '20 at 18:18
  • Maybe this one: https://stackoverflow.com/questions/5459444/tkinter-python-may-not-be-configured-for-tk – Wouterr Jan 13 '20 at 18:24

1 Answers1

-1

Maybe you can try import tkinter instead of import _tkinter

F.M
  • 935
  • 13
  • 28
  • @Bryan Oakley that's why, so `import tkinter` instead of `import _tkinter` – F.M Jan 13 '20 at 19:44
  • 1
    They are importing tkinter; tkinter imports _tkinter. The very first line of the question says they are importing tkinter. – Bryan Oakley Jan 13 '20 at 19:57