In another virtual environment with the same setup, the master branch works fine.
My Env:
Win 10
Azure Kinect SDK 1.4.1
Azure Kinect Body Tracking SDK 1.1.2
Anaconda virtual env. Python 3.9.16
Details:
`(k4abody) C:\Users\Tamas>pip install pyk4a --no-use-pep517 --global-option=build_ext --upgrade git+https://github.com/etiennedub/pyk4a.git@feature/body-tracking --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" --global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib" --global-option="build_ext" --global-option="--enable-body-tracking"
WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option / --install-option. Consider using --config-settings for more flexibility.
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
Collecting git+https://github.com/etiennedub/pyk4a.git@feature/body-tracking
Cloning https://github.com/etiennedub/pyk4a.git (to revision feature/body-tracking) to c:\users\tamas\appdata\local\temp\pip-req-build-uni7u9wa
Running command git clone --filter=blob:none --quiet https://github.com/etiennedub/pyk4a.git 'C:\Users\Tamas\AppData\Local\Temp\pip-req-build-uni7u9wa'
Running command git checkout -b feature/body-tracking --track origin/feature/body-tracking
Branch 'feature/body-tracking' set up to track remote branch 'feature/body-tracking' from 'origin'.
Switched to a new branch 'feature/body-tracking'
Resolved https://github.com/etiennedub/pyk4a.git to commit 007fb38f5cc932cad32bab337d5807857ac13fc1
Preparing metadata (setup.py) ... done
Collecting pyk4a
Using cached pyk4a-1.5.0.tar.gz (24 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in d:\programdata\anaconda3\envs\k4abody\lib\site-packages (from pyk4a==1.1.0) (1.24.2)
Installing collected packages: pyk4a
DEPRECATION: pyk4a is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/11451
Running setup.py install for pyk4a ... error
error: subprocess-exited-with-error
× Running setup.py install for pyk4a did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
D:\ProgramData\Anaconda3\envs\k4abody\lib\site-packages\setuptools\dist.py:770: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running build_ext
building 'k4a_module' extension
creating build
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\pyk4a
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DENABLE_BODY_TRACKING=1 -ID:\ProgramData\Anaconda3\envs\k4abody\lib\site-packages\numpy\core\include "-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" -ID:\ProgramData\Anaconda3\envs\k4abody\include -ID:\ProgramData\Anaconda3\envs\k4abody\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tppyk4a/pyk4a.cpp /Fobuild\temp.win-amd64-cpython-39\Release\pyk4a/pyk4a.obj
pyk4a.cpp
D:\ProgramData\Anaconda3\envs\k4abody\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
pyk4a/pyk4a.cpp(8): fatal error C1021: invalid preprocessor command 'warning'
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pyk4a
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.`
Hi, the body tracking was never officially supported in pyk4a unfortunately. The branch is lagging behind. Look around the various PR related to it, maybe it will help you with the setup.
Hi, Installation fails with "pyk4a/pyk4a.cpp(8): fatal error C1021: invalid preprocessor command 'warning'"
pip install pyk4a --no-use-pep517 --global-option=build_ext --upgrade git+https://github.com/etiennedub/pyk4a.git@feature/body-tracking --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" --global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib" --global-option="build_ext" --global-option="--enable-body-tracking"
In another virtual environment with the same setup, the master branch works fine.
My Env: Win 10 Azure Kinect SDK 1.4.1 Azure Kinect Body Tracking SDK 1.1.2 Anaconda virtual env. Python 3.9.16
Details: