Results 1 to 3 of 3

Thread: how to fix ' ModuleNotFoundError: No module named 'tkinter' ' error ?

  1. #1
    Join Date
    Dec 2016
    Beans
    8

    how to fix ' ModuleNotFoundError: No module named 'tkinter' ' error ?

    program:::::::::::::

    from tkinter import *

    root = Tk()

    word = Label(root,text="hello word")

    word.pack()

    root.mainloop()


    error message::::::::::::

    Traceback (most recent call last):
    File "py_window.py", line 1, in <module>
    from tkinter import *
    ModuleNotFoundError: No module named 'tkinter'

    using pyphon version 3.6.9
    on ubuntu 18.04.3 lts

    how do I get the program to work/run?

    capping T in tkinter does nothing to remove error message.

    thanks
    Last edited by artunix; January 6th, 2020 at 05:45 AM.

  2. #2
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,531
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: how to fix ' ModuleNotFoundError: No module named 'tkinter' ' error ?

    Code:
    sudo apt install python3-tk

  3. #3
    Join Date
    Dec 2016
    Beans
    8

    Re: how to fix ' ModuleNotFoundError: No module named 'tkinter' ' error ?

    well the internet said that 'tkinter' was already part of python 3.X.

    but it was wrong.. again...

    your reply got the programs working again, thank you!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •