title: Tkinter couldn't connect to display ":0"
body: <p>I'm using tkinter for a project, when running the code I get the message</p>
  
  <pre><code>self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
  _ tkinter.TclError: couldn't connect to display ":0"
  
  echo $DISPLAY returns :0
  </code></pre>
  
  <p>I've tried export DISPLAY=:0 and export DISPLAY=:0.0 but it doesn't work.</p>
  
  <p>I want to display the GUI on the screen of the laptop Im on(the answers regarding ssh on the forum seem unrelated).</p>
  
  <p>I'm using ubuntu on windows.
  I have tried using both python3 and 2.7 but I get the same message.</p>