1

I have been working in python Tkinter for a few days and it's been working fine but today when I wrote the code and tried to import the Tkinter module, like this:

from Tkinter import * It showed me the error that: import _tkinter # If this fails your Python may not be configured for Tk ImportError: DLL load failed: The specified module could not be found. Is there a way to fix this and import Tkinter?

Arnav Poddar
  • 354
  • 2
  • 18
Jawad Saqib
  • 95
  • 1
  • 3
  • 10

1 Answers1

0

All credit to this answer goes to @martineau and @stovfl, who posted the answers as comments. One way to fix your problem is to reinstall python. This will redownload the Tkinter module as newer versions now auto download Tkinter. You could also try installing it through the command prompt, like so: python -m pip install tkinter or python -m easy_install tkinter This will make sure that tkinter is installed on your computer and that you can import it properly. Make sure to visit Import _tkinter or tkinter? for the difference between tkinter and _tkinter

Arnav Poddar
  • 354
  • 2
  • 18