Traceback (most recent call last):
File "1.py", line 1, in <module>
import pyautogui
File "/home/prasoon/.local/lib/python2.7/site-packages/pyautogui/__init__.py", line 115, in <module>
from . import _pyautogui_x11 as platformModule
File "/home/prasoon/.local/lib/python2.7/site-packages/pyautogui/_pyautogui_x11.py", line 160, in <module>
_display = Display(os.environ['DISPLAY'])
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'DISPLAY'
Python version- Python 2.7.15rc1
While running "import pyautogui" this error is being thrown
I have installed the below-
pip install python3-xlib
sudo apt-get install scrot
sudo apt-get install python3-tk
sudo apt-get install python3-dev
pip install pyautogui
from importing pyautogui in ubuntu throwing KEYERROR :DISPLAY
0 komentar:
Posting Komentar