Closed Niutonian closed 2 months ago
Hi thank you, installing dlib is tricky sometimes
activate your comfy environment
if pip install dlib --verbose does not work
run sudo apt-get install cmake try again if it still doesn't work
go to
https://github.com/davisking/dlib clone the repo to any location
git clone https://github.com/davisking/dlib.git
got to the root of the repo and run sudo python3 setup.py install
while your comfy env is active
@if-ai hey, thanks a lot for your quick answer, I'm using windows right now, do you know how to activate Comfyui environment?
maybe like this ComfyUI\venv\Scripts\activate.bat there is also a bat file that should install everything if you got the portable vers all it does is somth like H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install -r requirements.txt
I got the same error today in the dreamtalk node, windows 10 portable comfyui, dlib refuses to install, I tried manually installing it, even installed CMake and visual studio build tools, still no luck. possibly an issue with using the embedded python?
I got the same error today in the dreamtalk node, windows 10 portable comfyui, dlib refuses to install, I tried manually installing it, even installed CMake and visual studio build tools, still no luck. possibly an issue with using the embedded python?
I have it working on embedded python windows 10 too with H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install dlib
maybe H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install cmake
first
or you could git clone the dilib repo
git clone https://github.com/davisking/dlib.git
cd dlib
H:\ComfyUI_windows_portable\python_embeded\python.exe setup.py install
\ComfyUI_windows_portable\python_embeded\python.exe -m pip install cmake reports that cmake is installed.
\ComfyUI_windows_portable\python_embeded\python.exe -m pip install dlib produces the attached error. I also tried to build it from the github link and got the same error I think.
Did you try pip install --upgrade pip so you are on the latest pip? otherwise I think I will split whisper speech onto it's own repo, so people can still use the other nodes without dlib
yes, PS Z:\ComfyUI_windows_portable> .\python_embeded\Scripts\pip.exe install --upgrade pip Requirement already satisfied: pip in z:\comfyui_windows_portable\python_embeded\lib\site-packages (24.0)
Same problem, dlib says cmake needs to be installed, while it IS already installed. Upgrading CMake didn't help, neither did upgrading pip. Still produces:
Building wheels for collected packages: dlib
Building wheel for dlib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running bdist_wheel
running build
running build_ext
ERROR: CMake must be installed to build dlib
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
@if-ai I have tried upgrading, pip, cmake, downloaded dlib from git and tried installing it, but even though cmake is installed, I still get this error
E:\COMFYUI\ComfyUI_windows_portable12_1\python_embeded\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
E:\COMFYUI\ComfyUI_windows_portable12_1\python_embeded\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
running bdist_egg
running egg_info
writing tools/python\dlib.egg-info\PKG-INFO
writing dependency_links to tools/python\dlib.egg-info\dependency_links.txt
writing top-level names to tools/python\dlib.egg-info\top_level.txt
reading manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\cmake_utils\*\build*'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
adding license file 'LICENSE.txt'
writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
ERROR: CMake must be installed to build dlib
DEDICATED ENV
Activate the env
on conda env
conda install -c conda-forge dlib
on micromamba env
micromamba install -c conda-forge dlib
open terminal as admin
pip uninstall cmake
pip uninstall dlib
WINDOWS
H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install cmake
H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install dlib
or activate env
python -m -m pip install cmake
python -m pip install dlib
if not try with the terminal as admin
pip uninstall cmake
pip uninstall dlib
pip install cmake
git clone https://github.com/davisking/dlib.git
cd dlib
H:\ComfyUI_windows_portable\python_embeded\python.exe setup.py install
There is an error about visual studio in the middle. is it mandatory to have it?
K:\python_embeded>git clone https://github.com/davisking/dlib.git Cloning into 'dlib'... remote: Enumerating objects: 51600, done. remote: Counting objects: 100% (147/147), done. remote: Compressing objects: 100% (112/112), done. remote: Total 51600 (delta 64), reused 94 (delta 35), pack-reused 51453 Receiving objects: 100% (51600/51600), 48.14 MiB | 19.89 MiB/s, done. Resolving deltas: 100% (36443/36443), done. Updating files: 100% (2260/2260), done.
K:\python_embeded>cd dlib
K:\python_embeded\dlib>python setup.py install running install running bdist_egg running egg_info creating tools\python\dlib.egg-info writing tools/python\dlib.egg-info\PKG-INFO writing dependency_links to tools/python\dlib.egg-info\dependency_links.txt writing top-level names to tools/python\dlib.egg-info\top_level.txt writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt' adding license file 'LICENSE.txt' (matched pattern 'LICEN[CS]E') reading manifest file 'tools/python\dlib.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'tools\python\build' no previously-included directories found matching 'dlib\cmake_utils*\build' warning: no previously-included files matching '.pyc' found anywhere in distribution writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_ext Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] Invoking CMake setup: 'cmake K:\python_embeded\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=K:\python_embeded\dlib\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=C:\Program Files\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=K:\python_embeded\dlib\build\lib.win-amd64-3.9 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you are getting this error it means you have not installed Visual C++. Note that there are many flavors of Visual Studio, like Visual Studio for C# development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "K:\python_embeded\dlib\setup.py", line 220, in
I move it the whisperSpeech which was creating the error to a new repo https://github.com/if-ai/ComfyUI-IF_AI_WishperSpeechNode
You must likely have the same issues to install it but at least now you can try the other nodes for the TTS part and you can always use other tts I have another one here https://github.com/if-ai/ComfyUI-IF_AI_ParlerTTSNode I also have a better explanation on how to install it over there but yes I think you will probs need VStudio as I have it already that might be why it installed it on the first try
It seems like the problem was a whl doesn't exist for the comfyui python embedded 3.11 for dlib so you have to build it.
I was able to resolve this error by installing the same version of python comfyui embedded to system using to PATH option during setup. You can get your version portable version by typing python --version
in comfyui folder.
Then install the cmake windows installer. Then visual studio installer and install all of the 2022 build tools options. Then I close down cmd window reopen it for \comfyui directory and run python.exe -m pip install dlib
and it built it dlib without the error.
Then go to Comfyui folder \python_embeded and run python.exe -m pip install dlib
Edit: or to make this easier you can just copy the 3.11 whl I built to python_embedded and run python.exe -m pip install dlib-19.24.4-cp311-cp311-win_amd64.whl
Make sure your portable is using same version of python as this .whl or do the steps above and build a new whl manually.
Hello, the latest upgrade gives me this error
I guess it has problem running dlib, hope it can be saved.