2

I am new to pykinect2 and have never used it before. I have created a virtual environment and used pip install pykinect2 to install the library, 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
Sho
  • 21
  • 5
  • I suggest looking at the docs of `pykinect2` and using a supported python version that you find there, many libraries are not yet compatible with python 3.11. – Caridorc Apr 09 '23 at 20:01

1 Answers1

0

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.

amran hossen
  • 270
  • 5
  • 11