Closed superpeachman closed 8 months ago
Sorry, it was my fault. The importing was done successfully.
I have struggled to install ndi-python to my ComfyUI python environment (Windows.) This error was related to the matter.
Just a piece of information for those new to ComfyUI, like me...
I had an error when installing "ndi-python" to my ComfyUI python environment (Windows) by "pip install ndi-python" and couldn't finish installing it.
So, 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 the build) and the Python version on your "ComfyUI" are the same. Built with 3.10 did not work on my ComfyUI, but built with 3.11 works now.)
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
Hey @superpeachman @ningxiaoxiao
I followed your steps but I do not see the NDIlib
folder... Better said, that folder only have a 'init.py' file.
Do you mean to copy 'D:\ndi-python\build\NDIlib.dir' or related instead?
Thanks!
PS D:\ndi-python> python setup.py build
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\NDIlib
copying NDIlib\__init__.py -> build\lib.win-amd64-cpython-310\NDIlib
running build_ext
cmake .. -DCMAKE_INSTALL_PREFIX=D:\ndi-python\build\install
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26120.
-- The C compiler identification is MSVC 19.42.34226.3
-- The CXX compiler identification is MSVC 19.42.34226.3
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.42.34226/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.42.34226/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at lib/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- pybind11 v2.9.2
CMake Warning (dev) at lib/pybind11/tools/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
lib/pybind11/tools/pybind11Tools.cmake:50 (find_package)
lib/pybind11/tools/pybind11Common.cmake:206 (include)
lib/pybind11/CMakeLists.txt:200 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: C:/Users/moebi/AppData/Local/Microsoft/WindowsApps/python3.11.exe (found version "3.11.9")
-- Found PythonLibs: C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0/libs/python311.lib
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
-- Found NDI: C:/Program Files/NDI/NDI 6 SDK
-- Configuring done (9.2s)
-- Generating done (0.0s)
-- Build files have been written to: D:/ndi-python/build
cmake --build . --config Release --target install
MSBuild version 17.12.0-preview-24402-01+bd46115a1 for .NET Framework
1>Checking Build System
Building Custom Rule D:/ndi-python/CMakeLists.txt
main.cpp
Creating library D:/ndi-python/build/Release/NDIlib.lib and object D:/ndi-python/build/Release/NDIlib.exp
Generating code
Finished generating code
NDIlib.vcxproj -> D:\ndi-python\build\Release\NDIlib.cp311-win_amd64.pyd
Building Custom Rule D:/ndi-python/CMakeLists.txt
1>
-- Install configuration: "Release"
-- Installing: D:/ndi-python/build/install/NDIlib.cp311-win_amd64.pyd
-- Installing: D:/ndi-python/build/install/Processing.NDI.Lib.x64.dll
-- Installing: D:/ndi-python/build/install/Processing.NDI.Lib.Licenses.txt
Ok. it working placing files like that:
Hi,
I installed comfyui-NDI from Comfy Manager. Then, I started to get this import error when I launched ComfyUI. I also installed comfyui-NDI from Git clone in my "custom_nodes" directory (after uninstalling comfyui-NDI by Comfy Manager), but I still got the same import error.
Certainly, my Python environment of ComfyUI installed "opencv-python."