真是不明白,我在部分win7电脑直接pip install pywinauto 就可以。但是又有几部电脑安装pywinauto后,import pywinauto 就是有下面的错误。
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
Traceback (most recent call last):
File "D:\Python38-32\lib\ctypes\__init__.py", line 123, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>, <class 'ctypes.c_long'>, <class 'comtypes.LP_POINTER(IUIAutomationTextRange)'>), 0)
During handling of the above exception, another exception occurred:
来源:CSDN
作者:jhui123456
链接:https://blog.csdn.net/jhui123456/article/details/104166540