python3-devel and tools development already installed with development libraries .
luc@fedora39:~$ sudo dnf install cmake
Last metadata expiration check: 3:27:22 ago on Fri 26 Jul 2024 01:44:49 PM CEST.
Package cmake-3.27.7-1.fc39.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
luc@fedora39:~$ cd ComfyUI
luc@fedora39:~/ComfyUI$ source .venv/bin/activate
(.venv) luc@fedora39:~/ComfyUI$ pip uninstall cmake
Found existing installation: cmake 3.30.1
Uninstalling cmake-3.30.1:
Would remove:
/home/luc/ComfyUI/.venv/bin/cmake
/home/luc/ComfyUI/.venv/bin/cpack
/home/luc/ComfyUI/.venv/bin/ctest
/home/luc/ComfyUI/.venv/lib/python3.12/site-packages/cmake-3.30.1.dist-info/*
/home/luc/ComfyUI/.venv/lib/python3.12/site-packages/cmake/*
Proceed (Y/n)? y
Successfully uninstalled cmake-3.30.1
(.venv) luc@fedora39:~/ComfyUI$ pip install cmake
Collecting cmake
Using cached cmake-3.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.1 kB)
Using cached cmake-3.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.9 MB)
Installing collected packages: cmake
Successfully installed cmake-3.30.1
(.venv) luc@fedora39:~/ComfyUI$ pip install dlib
Collecting dlib
Using cached dlib-19.24.4.tar.gz (3.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
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
╰─> [13 lines of output]
<string>:210: SyntaxWarning: invalid escape sequence '\('
<string>:211: SyntaxWarning: invalid escape sequence '\('
<string>:212: SyntaxWarning: invalid escape sequence '\('
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "/home/luc/ComfyUI/.venv/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dlib)
(.venv) luc@fedora39:~/ComfyUI$ pip show cmake
Name: cmake
Version: 3.30.1
Summary: CMake is an open-source, cross-platform family of tools designed to build, test and package software
Home-page: https://cmake.org
Author:
Author-email: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
License: Apache 2.0
Location: /home/luc/ComfyUI/.venv/lib/python3.12/site-packages
Requires:
Required-by:
(.venv) luc@fedora39:~/ComfyUI$
At this point I would grab the sources of that package and run its build outside of pip so that I could see it fail and examine the files involved.
Goto the packages PyPI page (usually a web search fpr pypi package works).
You end up here: dlib · PyPI
Check that the project has a recent release and therefore is likely to still work (it does).
to be honest , i did git clone the repo in my Home folder but now i’m a bit lost on what to do , should i :
Compiling dlib C++ example programs
Compiling your own C++ programs that use dlib
Compiling dlib Python API
Running the unit test suite
i stopped it , start it again as i need explanation for api
As i understand it i need to create a venv env file in home/dlib
but for this command which version should i use :
python -m build --wheel
pip install dist/dlib- < version > .whl
the test suite is quite slow , sorry
luc@fedora39:~/dlib/dlib/test/build$ cmake ..
-- The C compiler identification is GNU 13.3.1
-- The CXX compiler identification is GNU 13.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMake version: 3.27.7
-- Compiling dlib version: 19.24.99
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found system copy of libpng: /usr/lib64/libpng.so;/usr/lib64/libz.so
-- Searching for JPEG XL
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.5")
-- Checking for modules 'libjxl;libjxl_cms;libjxl_threads'
-- Package 'libjxl', required by 'virtual:world', not found
-- Package 'libjxl_cms', required by 'virtual:world', not found
-- Package 'libjxl_threads', required by 'virtual:world', not found
*****************************************************************************
*** No JPEG XL libraries found. ***
*** On Ubuntu 23.04 and newer you can install them by executing ***
*** sudo apt install libjxl-dev ***
*** ***
*** Otherwise, you can find precompiled packages here: ***
*** https://github.com/libjxl/libjxl/releases ***
*****************************************************************************
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
-- Package 'cblas', required by 'virtual:world', not found
-- Checking for module 'lapack'
-- Package 'lapack', required by 'virtual:world', not found
-- Looking for cblas_ddot
-- Looking for cblas_ddot - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
*****************************************************************************
*** No BLAS library found so using dlib's built in BLAS. However, if you ***
*** install an optimized BLAS such as OpenBLAS or the Intel MKL your code ***
*** will run faster. On Ubuntu you can install OpenBLAS by executing: ***
*** sudo apt-get install libopenblas-dev liblapack-dev ***
*** Or you can easily install OpenBLAS from source by downloading the ***
*** source tar file from http://www.openblas.net, extracting it, and ***
*** running: ***
*** make; sudo make install ***
*****************************************************************************
CMake Warning (dev) at /home/luc/dlib/dlib/CMakeLists.txt:652 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
-- Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken or incomplete. Since cuBLAS is required for dlib to use CUDA we won't use CUDA.
-- DID NOT FIND CUDA
-- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA
-- Searching for FFMPEG/LIBAV
-- Checking for modules 'libavdevice;libavfilter;libavformat;libavcodec;libswresample;libswscale;libavutil'
-- Package 'libavdevice', required by 'virtual:world', not found
-- Package 'libavfilter', required by 'virtual:world', not found
-- Package 'libavformat', required by 'virtual:world', not found
-- Package 'libavcodec', required by 'virtual:world', not found
-- Package 'libswresample', required by 'virtual:world', not found
-- Package 'libswscale', required by 'virtual:world', not found
-- Package 'libavutil', required by 'virtual:world', not found
*****************************************************************************
*** No FFMPEG/LIBAV libraries found. ***
*** On Ubuntu you can install them by executing ***
*** sudo apt install libavdevice-dev libavfilter-dev libavformat-dev ***
*** sudo apt install libavcodec-dev libswresample-dev libswscale-dev ***
*** sudo apt install libavutil-dev ***
*****************************************************************************
OpenCV not found, so we won't build the webcam_face_pose_ex example.
-- Configuring done (3.2s)
-- Generating done (0.3s)
-- Build files have been written to: /home/luc/dlib/dlib/test/build
went all the way without errors
you didn’t answer me for which version to use for the Compiling dlib python API , so i really don’t know how to run it
it doesn’t matter as i found the solution. Cmake was already installed thru dnf package , and i was trying to install dlib in my ComfyUI .venv which was needed for face recognition . cmake was also installed thru pip install in my .venv which was the pb. After uninstalling cmake from my .venv i was able to install dlib . I supposed the cmake in venv was conflicting with the one installed with dnf