Home > Net >  Tkinter stopped runing and print erorr?
Tkinter stopped runing and print erorr?

Time:03-20

I was using tkinter all fine but one day I turned on my pc and just stopped working.

I use python 3.9.10 windows

code:

from tkinter import *
from tkinter.ttk import *

terminal:

   from tkinter import *
  File "C:\Users\rotok\AppData\Local\Programs\Python\Python39-32\lib\tkinter\__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

CodePudding user response:

First You can try reinstalling it by using these codes:

pip install -I pip install --ignore-installed

If it won't work reinstall pip by using this code:

python -m pip install --upgrade --force-reinstall pip

and then try - pip install tkinter

I hope it solves your doubt...

CodePudding user response:

I simply changed python version and now it's working fine.

I use now python 3.8.1

  • Related