title: How do you fix tkinter in python3.8 on wsl?
body: <p>I was trying to learn GUI based python therefore i was using the Tkinter library. My OS is windows but I have installed Ubuntu wsl as my default terminal, and use wsl vscode as my default text-editor.
  I was just creating a basic window using this sample code to check whether it works or not:</p>
  <pre><code>from Tkinter import *
  def onclick():
  pass
  root = Tk()
  text = Text(root)
  text.insert(INSERT, &quot;Hello.....&quot;)
  text.insert(END, &quot;Bye Bye.....&quot;)
  text.pack()
  text.tag_add(&quot;here&quot;, &quot;1.0&quot;, &quot;1.4&quot;)
  text.tag_add(&quot;start&quot;, &quot;1.8&quot;, &quot;1.13&quot;)
  text.tag_config(&quot;here&quot;, background=&quot;yellow&quot;, foreground=&quot;blue&quot;)
  text.tag_config(&quot;start&quot;, background=&quot;black&quot;, foreground=&quot;green&quot;)
  root.mainloop()
  </code></pre>
  <p>Turns out it does not work with python3.8.
  <a href="https://i.stack.imgur.com/8UZfN.png" rel="nofollow noreferrer">Terminal error message</a>
  I looked up multiple resources and forums and could not find any proper solutions. Here are couple of links i have referred to:
  <a href="https://realpython.com/python-gui-tkinter/" rel="nofollow noreferrer">https://realpython.com/python-gui-tkinter/</a> <a href="https://tkdocs.com/tutorial/install.html" rel="nofollow noreferrer">https://tkdocs.com/tutorial/install.html</a> <a href="https://askubuntu.com/questions/1224230/how-to-install-tkinter-for-python-3-8">https://askubuntu.com/questions/1224230/how-to-install-tkinter-for-python-3-8</a> .
  A work around I discovered was that installed anaconda which uses python3.7 and used the windows terminal instead (using pycharm not vscode). And it looks like it is functioning properly.
  <a href="https://i.stack.imgur.com/iHsvP.png" rel="nofollow noreferrer">GUI with python3.7</a></p>
  <p>The thing is.. I like wsl and vscode far better than windows command line, and I wanted to revert back to it. Is there any solution? I really do not want to fool around with the path too much because I had a bad experience previously (But i am willing to do it again if its going to fix my problem). Thanks for hearing me out.</p>