I can't use tkinter library when coding.
**Could you please advise me, what to do?
**
Errors:
- For code:
import tkinter
tkinter._test()
ImportError: DLL load failed: The specified module could not be found.
import _tkinter # If this fails your Python may not be configured for Tk
- For code:
import Tkinter
tkinter._test()
ModuleNotFoundError: No module named 'Tkinter'
- For code with libraries tcl86t.dll and tk86t.dll in the same folder as *.py file:
import tkinter
tkinter._test()
TclError: Can't find a usable init.tcl in the following directories:
F:/Nauka/Python/lib/tcl8.6
D:/Spyder/lib/tcl8.6
D:/lib/tcl8.6
D:/Spyder/library
D:/library
D:/tcl8.6.9/library
D:/tcl8.6.9/library
My environment:
- Python 3.9.1 64 bit
- Windows 10 64 bit
- Working on Spyder IDE
I have following packages installed:
- tk==0.1.0
- tk-tools==0.13.0
- Tcl/Tk version 8.6
What I tried so far:
- Manipulation of tkinter phrase (as I understood it is correct one)
- Moving libraries
- Reinstallation/modification/repair of Python
Simillar issues: - matplotlib error - no module named tkinter
- Tkinter: "Python may not be configured for Tk"