Comments (21)
- I had the same problems installing the face-recognition library and got it working after trying these versions of cmake and dlib:
pip install cmake==3.25.2
pip install dlib==19.24.2
- I'm using a virtual environment with Python 3.9.1 and Windows 11, Also in python global I do not have cmake or dlib installed, only in my virtual environment
from dlib.
I am experiencing the same issue as well. dlib==19.24.2
is working fine but I am having an issue with the latest release.
P.S. Trying it in dockerized env.
from dlib.
cmake isn't really installed right. Try apt install cmake
. For whatever reason the version of cmake that comes from pip is broken on a lot of systems.
from dlib.
I would try the following things
- remove all cmake installations (until
which cmake
returns nothing) - build dlib in a new and clean virtualenv (
python -m venv venv && source venv/bin/activate && pip install cmake==3.25 && pip install dlib
)
FYI, I am using CMake 3.29.1 and it works fine.
from dlib.
Try getting cmake from cmake.org and installing it with their official installer. The versions of cmake available in pip are often broken. I would really only use the official cmake.
from dlib.
Cmake isn't installed correctly. You should get cmake from cmake.org. That will work. There are lot of other places that repackage it into semi-broken cmake installers. You probably have one of those.
from dlib.
@davisking Unfortunately I already tried that :( Running sudo apt install cmake
gives me cmake is already the newest version (3.22.1-1ubuntu1.22.04.2)
from dlib.
Are you sure you're using the system-wide CMake instead of the one installed by pip?
from dlib.
@arrufat you're right, I was using pip's one I guess, as you can see from the error traceback it takes it from virtualenv... however, I tried to uninstall it and the error is the same, this time taking the system-wide cmake (in /.local
):
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
╰─> [10 lines of output]
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "/home/user/.local/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]
I checked, and the version installed in venv (via pip) was 3.29.0.1 and the system-wide is 3.25.2. Do you know how to force some cmake version during pip install
command?
Also, I tried to re-install dlib==19.24.2 forcing it the build (pip install --no-cache-dir
) and it ran correctly
from dlib.
@arrufat that's what I tried, in fact the command in error comes from /home/user/.local/bin/cmake
... but still no success
from dlib.
I still haven't solved it in my env, but I must say that it's probably a cmake installation issue as @arrufat and @davisking suggested. In fact, I tried to install everything from scratch in an Ubuntu docker image and version 19.24.4 is build and installed just fine
from dlib.
I am experiencing the same issue as well.
dlib==19.24.2
is working fine but I am having an issue with the latest release.P.S. Trying it in dockerized env.
I tried again and again about 19.24.4 but failed, then follow your advice, replace it with 19.24.2 .It's working now.
from dlib.
I am using linux system, and now the cmake version is okay (>3.8)
However, I can not "pip install dlib"
It showed the following error " cmd_obj.run()
File "/tmp/pip-build-env-_31gghmv/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-_31gghmv/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-_31gghmv/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-_31gghmv/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "", line 130, in run
File "", line 170, in build_extension
File "/opt/insy/miniconda/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j64']' returned non-zero exit status 2.
[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"
I think the same with this bug --cannot build wheels for dlib.
from dlib.
- I had the same problems installing the face-recognition library and got it working after trying these versions of cmake and dlib:
pip install cmake==3.25.2 pip install dlib==19.24.2
- I'm using a virtual environment with Python 3.9.1 and Windows 11, Also in python global I do not have cmake or dlib installed, only in my virtual environment
I am using linux system:
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core
This method did not work for me, still "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"
from 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
╰─> [9 lines of output]
:210: SyntaxWarning: invalid escape sequence '('
:211: SyntaxWarning: invalid escape sequence '('
:212: SyntaxWarning: invalid escape sequence '('
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
help me, i have this problem when downloading dlib
from dlib.
This worked for me (CentOS 8)
yum install python3-devel
yum groupinstall 'Development Tools'
pip install dlib
from dlib.
but i use win 11
from dlib.
- I had the same problems installing the face-recognition library and got it working after trying these versions of cmake and dlib:
pip install cmake==3.25.2
pip install dlib==19.24.2
- I'm using a virtual environment with Python 3.9.1 and Windows 11, Also in python global I do not have cmake or dlib installed, only in my virtual environment
This worked out for me while developing for Python in Docker container. Manually changed the version of the package.
from dlib.
win11
`pip install cmake==3.25.2
pip install dlib==19.24.2`
(CentOS 8)
`yum install python3-devel
yum groupinstall 'Development Tools'
pip install dlib`
from dlib.
Dear ALL,
SAme issued.
UBUNTU : Ubuntu 24.04 LTS (Noble)
CMAKE installed with APT : cmake version 3.28.3
PIP INSTALL DLIB (19.24.2 or 19.24.4) : ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
Could you please help me ?
Thanks
from dlib.
Dear ALL, SAme issued. UBUNTU : Ubuntu 24.04 LTS (Noble) CMAKE installed with APT : cmake version 3.28.3 PIP INSTALL DLIB (19.24.2 or 19.24.4) : ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects Could you please help me ? Thanks
SOLVED WITH DOCKER.
from dlib.
Related Issues (20)
- [Bug]: DLib build error HOT 5
- [Bug]: /usr/include/c++/11/cmath:45:15: fatal error: math.h: No such file or directory HOT 1
- [Bug]: Windows build doesn't set parallel build thread count properly HOT 5
- [Bug]: compute_face_descriptors is not releasing memory properly HOT 7
- [Bug]: cmake not found during dlib installation using pip (even though cmake installed correctly) HOT 28
- [Bug]: HOT 5
- [Bug]: linking error using DLIB_USE_MKL_WITH_TBB = ON HOT 4
- [Bug]: Python for android support HOT 3
- NEON Instructions for ARM chips HOT 4
- [Bug]: Fhog_example does not work with example data HOT 4
- [Bug]: HOT 1
- [Bug]: DLIB_IN_PROJECT_BUILD incorrectly puts -llapack into `Libs` of `dlib-1.pc` HOT 3
- [Bug]: ImportError: /usr/lib/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal HOT 2
- [Bug]: having issues converting opencv mat to iplimage HOT 4
- [Bug]: Cannot build wheel on macOS since v19.24.2 HOT 4
- [Bug]: runtime error importing dlib HOT 7
- [Bug]: python setup.py install (_dlib_pybind11: not found error) / pip install dlib (CUDA disabled error) HOT 6
- [Bug]: dlib doesnt install. says cmake is required but have installed cmake. HOT 10
- [Bug]: RuntimeError in dlib.load_rgb_image: Failing expression was false with Python HOT 10
- [Bug]: dlib.DLIB_USE_CUDA: false HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlib.