!sudo apt install tesseract-ocr
!pip install pytesseract
!pip install pyinstaller
!pip install pyautogui
!pip install pillow
!pip install python3_xlib python-xlib
这就是我第一个单元格中的东西。
然后,当我尝试导入pyautogui时,它显示此错误:
ConnectionRefusedError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/Xlib/support/unix_connect.py in get_socket(dname, protocol, host, dno)
118 try:
--> 119 s = _get_unix_socket(address)
120 except socket.error:
10 frames
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
ConnectionRefusedError Traceback (most recent call last)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
DisplayConnectionError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/Xlib/support/unix_connect.py in get_socket(dname, protocol, host, dno)
125 raise
126 except socket.error as val:
--> 127 raise error.DisplayConnectionError(dname, str(val))
128
129 # Make sure that the connection isn't inherited in child processes.
DisplayConnectionError: Can't connect to display ":0": [Errno 111] Connection refused
我想这与colab无法连接到我的计算机有关,但我不知道。