我使用以下行使用anaconda提示符安装PyAutoGui:
pip -m install pyautogui
安装似乎成功,但在google上导入库pyautogui时 colab,我得到以下错误:
KeyError Traceback (most recent call last) in () ----> 1 import pyautogui
2 frames /usr/lib/python3.7/os.py in getitem(self, key) 679 except KeyError: 680 # raise KeyError with the original key value --> 681 raise KeyError(key) from None 682 return self.decodevalue(value) 683
KeyError: 'DISPLAY'
我能做些什么来解决这个问题
我发现了一个有趣的材料:
https://tylergarrett.com/code/2018/11/using-pyautogui-with-colaboratory-not-possible-today/
简而言之,作者说
https://colab.research.google.com/drive/1UtSMGU5UaGowWA9mM3Kq7QR-LBzbbFDE?usp=sharing
相关问题 更多 >
编程相关推荐