我下载了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
该语法仅对Python2有效。显然,python3的代码没有完全更新。向他们的追踪器报告错误。在
博士的答案是正确的。我成功地修正了这个错误使用水蟒分布。 只需将Lib\site packages\comtypes目录的内容替换为anaconda目录的内容。在
相关问题 更多 >
编程相关推荐