1、运行时出现报错:ModuleNotFoundError: No module named 'cv2'
Traceback (most recent call last): File "<string>", line 7, in <module> File "D:Python39libsite-packagescached_property.py", line 36, in __get__ value = obj.__dict__[self.func.__name__] = self.func(obj) File "D:Python39libsite-packagesuiautomator2\__init__.py", line 1756, in widget from uiautomator2.widget import Widget File "D:Python39libsite-packagesuiautomator2widget.py", line 16, in <module> import uiautomator2.image as uim File "D:Python39libsite-packagesuiautomator2image.py", line 15, in <module> import cv2 ModuleNotFoundError: No module named 'cv2' [Finished 1.042s]
解决方法:
安装拓展库:pip install opencv-python
2、运行时出错:ModuleNotFoundError: No module named 'imutils'
Traceback (most recent call last): File "<string>", line 7, in <module> File "D:Python39libsite-packagescached_property.py", line 36, in __get__ value = obj.__dict__[self.func.__name__] = self.func(obj) File "D:Python39libsite-packagesuiautomator2\__init__.py", line 1756, in widget from uiautomator2.widget import Widget File "D:Python39libsite-packagesuiautomator2widget.py", line 16, in <module> import uiautomator2.image as uim File "D:Python39libsite-packagesuiautomator2image.py", line 17, in <module> import imutils ModuleNotFoundError: No module named 'imutils'
解决方法:pip install imutils
3、运行时出错:
ModuleNotFoundError: No module named 'skimage'
解决方法:
pip install scikit-image