Tkinter not working in wsl2
So even after applying all the fixes that you found in stackoverflow if tkinter still doesnot work for you, don't worry I am here to help.
First things first , even if you install tcl/tk library in WSL2 tkinter will not work with python3.11. This is the issue I faced.
I tried to fix things but couldn't reach anywhere. But it had worked for me before so I was really curious as to what is the issue.
Then I downgraded python to 3.8 and voila
everything works now :)
You also might have to install apt install python3-tk tk-dev
for the tk libraries.
Thanks for reading!
Last update:
November 7, 2023