buresu / ndi-python

NewTek NDI Python wrapper
MIT License
133 stars 30 forks source link

[Install Error - Windows] ERROR: Could not build wheels for ndi-python, which is required to install pyproject.toml-based projects #34

Closed superpeachman closed 7 months ago

superpeachman commented 7 months ago

Hi,

I am getting an error when installing ndi-python to my Python Environment of ComfyUI.

My environment and packages.

Python 3.11.6 pip 23.3.2

cmake 3.28.1 setuptools 69.0.3 wheel 0.42.0

Collecting ndi-python
  Using cached ndi-python-5.1.1.1.tar.gz (16 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\XXXX\documents\comfyui_windows_portable\python_embeded\lib\site-packages (from ndi-python) (1.26.2)
Building wheels for collected packages: ndi-python
  Building wheel for ndi-python (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\NDIlib
      copying NDIlib\__init__.py -> build\lib.win-amd64-cpython-311\NDIlib
      running build_ext
      cmake .. "-DCMAKE_INSTALL_PREFIX=C:\Users\XXXX\AppData\Local\Temp\pip-install-ku5u0ijp\ndi-python_48e2298972944fb19f0655d32b84425f\build\install"
      error: command 'cmake' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ndi-python

There are many similar problems online, and they mostly seem to be solved by downgrading specific packages or installing cmake. My current packages are all updated. Is there any help...?

superpeachman commented 7 months ago

My installation was done successfully...

Just a piece of information for those new to ComfyUI, like me, if you have an error when installing to your ComfyUI python environment (Windows) by "pip install ndi-python" and can't finish installing it...

  1. I "Built with setup.py" along with instructions on the README.md. https://github.com/buresu/ndi-python (I recommend checking whether the Python version on your "Global" (if you use it for this build) and the Python version on your "ComfyUI" are the same. Built with Python 3.10 did not work on my ComfyUI, but built with 3.11 works now.)

  2. Then, I copied the NDIlib directory to "/ComfyUI_windows_portable\python_embeded\Lib\site-packages/" (as rastinder says here... Very thanks...) https://github.com/buresu/ndi-python/issues/31