Sho
Sho

Reputation: 19

Unable to run pykinect2 on python 3.11.1

I have created a virtual environment and used pip install pykinect2 to install pykinect2, but when I run the code import pykinect2 I am presented with the following error. I am using VSCode as my IDE.

PS D:\PythonVenv\kinect> & d:/PythonVenv/kinect/Scripts/Activate.ps1
(kinect) PS D:\PythonVenv\kinect> & d:/PythonVenv/kinect/Scripts/python.exe d:/PythonVenv/kinect/kinectv1.py
Traceback (most recent call last):
  File "d:\PythonVenv\kinect\kinectv1.py", line 8, in <module>
    from pykinect2 import PyKinectV2
  File "D:\PythonVenv\kinect\Lib\site-packages\pykinect2\PyKinectV2.py", line 2216, in <module>
    assert sizeof(tagSTATSTG) == 72, sizeof(tagSTATSTG)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 80

Upvotes: 1

Views: 831

Answers (1)

amran hossen
amran hossen

Reputation: 400

This happens when pykinec2 is installed with pip command.

Please Go to the pykinect2 installation in the site-packages folder (D:\PythonVenv\kinect\Lib\site-packages\pykinect2) and replace the .py files with the ones from the github repository.

git URL: https://pypi.org/project/pykinect2/

It should solve the problem.

Upvotes: 0

Related Questions