我在zip文件中下载了comtypes并使用pip install comtypes-1.1.7.zip
进行安装。已成功安装,但当我尝试导入模块时,它显示错误消息:
>>> import comtypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python367\lib\comtypes\__init__.py", line 381
except COMError, err:
^
SyntaxError: invalid syntax
该语法仅对Python 2有效。对于Python 3,代码显然没有完全更新。在跟踪器上报告错误。