Kinect / PyKinect2

Wrapper to expose Kinect for Windows v2 API in Python
MIT License
496 stars 236 forks source link

Importing PyKinectV2 throws ImportError("Wrong version") #88

Open vitphire opened 3 years ago

vitphire commented 3 years ago

When I try to import PyKinectV2 from pykinect2, it comes back with this:

Traceback (most recent call last):
  File "[Censored bc it includes my name]\PyCharm\Projects\PyKinectTest\test.py", line 1, in <module>
    from pykinect2 import PyKinectV2
  File "[Censored bc it includes my name]\PyCharm\Projects\PyKinectTest\venv\lib\site-packages\pykinect2\PyKinectV2.py", line 2868, in <module>
    from comtypes import _check_version; _check_version('')
  File "[Censored bc it includes my name]\PyCharm\Projects\PyKinectTest\venv\lib\site-packages\comtypes\__init__.py", line 29, in _check_version
    raise ImportError("Wrong version")
ImportError: Wrong version
KonstantinosAng commented 3 years ago

Try this solution to see if it fixes it:

https://github.com/Kinect/PyKinect2/issues/37

vitphire commented 3 years ago

@KonstantinosAng It does not.

KonstantinosAng commented 3 years ago

You can always go to venv\lib\site-packages\comtypes__init__.py in line 29 and delete the if statement to see if it works.

SujithChristopher commented 3 years ago

@vitrack I had the same issue,

it appears to be an issue with the comtypes version

try: pip install comtypes==1.1.4

Hope it helps

marcocrxu commented 3 years ago

i have also met the problem. after try #37 the problem still exist. but i find that reboot solve my probelm.

wjrzm commented 2 years ago

@vitrack I had the same issue,

it appears to be an issue with the comtypes version

try: pip install comtypes==1.1.4

Hope it helps

It works!