[轉載] AttributeError: module 'comtypes.gen.UIAutomationClient' has no attribute 'IUIAutomation'

原作者:   程小丽   

原文鏈接:https://blog.csdn.net/qq_30016059/article/details/102797911

使用 Pyinstaller 打包 導入Uiautomation的python 文件,在某些計算機上運行時出現  "AttributeError: module 'comtypes.gen.UIAutomationClient' has no attribute 'IUIAutomation' ",此問題一直未解決,在看到原博客后解決,解決方法 

安裝comtypes

from comtypes.gen.UIAutomationClient import *

重新打包 

原文地址:https://www.cnblogs.com/jyang/p/11961778.html