Reputation: 19
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
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