title: Pyautogui error on windows "KeyError: 'DISPLAY'"
body: <p>I have already used pyautogui on a Mac os system before without any trouble, but now I'm trying on a windows 10 machine running this code:</p>
  <pre><code>import pyautogui
  print(pyautogui.position())
  </code></pre>
  <p>And I get the following error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;screenshot.py&quot;, line 1, in &lt;module&gt;
      import pyautogui  File &quot;/home/cj/.local/lib/python3.8/site-packages/pyautogui/__init__.py&quot;, line 241, in &lt;module&gt;
      import mouseinfo
    File &quot;/home/cj/.local/lib/python3.8/site-packages/mouseinfo/__init__.py&quot;, line 223, in &lt;module&gt;
      _display = Display(os.environ['DISPLAY'])  File &quot;/usr/lib/python3.8/os.py&quot;, line 675, in __getitem__
      raise KeyError(key) from None
  KeyError: 'DISPLAY'
  </code></pre>
  <p>I have already tried with os.environ['DISPLAY'] = ':0' but it still doesn't work.
  It would just return this</p>
  <pre><code>Traceback (most recent call last):
    File &quot;screenshot.py&quot;, line 1, in &lt;module&gt;
      import pyautogui
    File &quot;/home/cj/.local/lib/python3.8/site-packages/pyautogui/__init__.py&quot;, line 241, in &lt;module&gt;
      import mouseinfo
    File &quot;/home/cj/.local/lib/python3.8/site-packages/mouseinfo/__init__.py&quot;, line 223, in &lt;module&gt;
      _display = Display(os.environ['DISPLAY'])
    File &quot;/home/cj/.local/lib/python3.8/site-packages/Xlib/display.py&quot;, line 89, in __init__
      self.display = _BaseDisplay(display)
    File &quot;/home/cj/.local/lib/python3.8/site-packages/Xlib/display.py&quot;, line 71, in __init__
      protocol_display.Display.__init__(self, *args, **keys)
    File &quot;/home/cj/.local/lib/python3.8/site-packages/Xlib/protocol/display.py&quot;, line 
  89, in __init__
      self.socket = connect.get_socket(name, protocol, host, displayno)
    File &quot;/home/cj/.local/lib/python3.8/site-packages/Xlib/support/connect.py&quot;, line 87, in get_socket
      return mod.get_socket(dname, protocol, host, dno)
    File &quot;/home/cj/.local/lib/python3.8/site-packages/Xlib/support/unix_connect.py&quot;, line 127, in get_socket
      raise error.DisplayConnectionError(dname, str(val))
  Xlib.error.DisplayConnectionError: Can't connect to display &quot;:0&quot;: [Errno 111] Connection refused
  </code></pre>
  <p>Any suggestion?</p>