OpenKinect / libfreenect

Drivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
http://openkinect.org
3.55k stars 1.15k forks source link

Installing the python wrapper on windows 10 gives error #632

Closed vitphire closed 1 year ago

vitphire commented 3 years ago

What could I be doing wrong? Maybe a missing dependency or something? Here's the logs from cmd:

C:\Users\Dani\Downloads\libfreenect-master\libfreenect-master\wrappers\python> python setup.py install
running install
running build
running build_ext
skipping 'freenect.c' Cython extension (up-to-date)
building 'freenect' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Dani\AppData\Local\Programs\Python\Python39\include -IC:\Users\Dani\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcfreenect.c /Fobuild\temp.win-amd64-3.9\Release\freenect.obj -fPIC -I ../../include/ -I /usr/include/libusb-1.0/ -I /usr/local/include/libusb-1.0 -I /usr/local/include -I ../c_sync/ -I C:\Users\Dani\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core\include
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
freenect.c
C:\Users\Dani\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
freenect.c(10210): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject'
freenect.c(10214): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject'
freenect.c(10218): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject'
freenect.c(11450): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
freenect.c(11466): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
freenect.c(11588): error C2039: 'exc_type': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11589): error C2039: 'exc_value': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11590): error C2039: 'exc_traceback': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11602): error C2039: 'exc_type': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11603): error C2039: 'exc_value': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11604): error C2039: 'exc_traceback': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11605): error C2039: 'exc_type': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11606): error C2039: 'exc_value': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
freenect.c(11607): error C2039: 'exc_traceback': is not a member of '_ts'
C:\Users\Dani\AppData\Local\Programs\Python\Python39\include\cpython/pystate.h(51): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
piedar commented 1 year ago

The existing freenect.c is outdated so it's better to generate it locally using one of these methods.