etiennedub / pyk4a

Python 3 wrapper for Azure-Kinect-Sensor-SDK
MIT License
287 stars 81 forks source link

ERROR: Could not build wheels for pyk4a, which is required to install pyproject.toml-based projects #206

Open vtasStu opened 1 year ago

vtasStu commented 1 year ago

Hello, I get this error when install pyk4a by pip

pip install pyk4a -i https://pypi.org/simple

Error

ERROR: Could not build wheels for pyk4a, which is required to install pyproject.toml-based projects

My env:

More details

Collecting pyk4a
  Using cached pyk4a-1.5.0.tar.gz (24 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\ymy\anaconda3\envs\cugpose\lib\site-packages (from pyk4a) (1.24.2)
Building wheels for collected packages: pyk4a
  Building wheel for pyk4a (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pyk4a (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      C:\Users\ymy\AppData\Local\Temp\pip-build-env-n_guzr1s\overlay\Lib\site-packages\setuptools\dist.py:788: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      Automatically detected kinect SDK. Adding include dir: C:\Program Files\Azure Kinect SDK v1.4.1\sdk\include and library dir C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\AMD64\release\lib.
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      creating build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\calibration.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\capture.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\config.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\errors.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\module.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\playback.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\pyk4a.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\record.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\results.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\transformation.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\win32_utils.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\__init__.py -> build\lib.win-amd64-cpython-39\pyk4a
      copying pyk4a\py.typed -> build\lib.win-amd64-cpython-39\pyk4a
      running build_ext
      building 'k4a_module' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyk4a
Failed to build pyk4a
ERROR: Could not build wheels for pyk4a, which is required to install pyproject.toml-based projects
vanmil commented 1 year ago

Having the same issue (already tried installing the correct Microsoft Visual C++ 14.0 modules with "Microsoft C++ Build Tools"

lpasselin commented 1 year ago

Can you confirm that you have selected to install the C++ compiler? There is probably a way to validate which features are currently installed.

https://www.scivision.dev/python-windows-visual-c-14-required

Xujc124 commented 1 year ago

It may be because you have not installed Microsoft C++ Compiling Tool.

https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/