pythonpippython-3.6comtypes

Error after installing comtypes-1.1.7 via pip from zip file


I downloaded comtypes in zip file and used pip install comtypes-1.1.7.zip to install it. Successfully installed, but when I try to import the module, it shows error message:

>>> 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

Solution

  • The syntax is valid only for Python 2. The code obviously was not fully updated for Python 3. Report the bug at their tracker.