GithubHelp home page GithubHelp logo

Comments (21)

AlanFRL avatar AlanFRL commented on August 27, 2024 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.

Goktug avatar Goktug commented on August 27, 2024 10

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.

davisking avatar davisking commented on August 27, 2024 4

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.

arrufat avatar arrufat commented on August 27, 2024 3

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.

davisking avatar davisking commented on August 27, 2024 1

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.

davisking avatar davisking commented on August 27, 2024 1

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.

FedericoCozziVM avatar FedericoCozziVM commented on August 27, 2024

@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.

arrufat avatar arrufat commented on August 27, 2024

Are you sure you're using the system-wide CMake instead of the one installed by pip?

from dlib.

FedericoCozziVM avatar FedericoCozziVM commented on August 27, 2024

@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.

FedericoCozziVM avatar FedericoCozziVM commented on August 27, 2024

@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.

FedericoCozziVM avatar FedericoCozziVM commented on August 27, 2024

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.

escalate007 avatar escalate007 commented on August 27, 2024

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.

Yuanyuan-888 avatar Yuanyuan-888 commented on August 27, 2024

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.

Yuanyuan-888 avatar Yuanyuan-888 commented on August 27, 2024
  • 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.

LTPPPP avatar LTPPPP commented on August 27, 2024

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.

jeltiy avatar jeltiy commented on August 27, 2024

This worked for me (CentOS 8)

yum install python3-devel
yum groupinstall 'Development Tools'
pip install dlib

from dlib.

LTPPPP avatar LTPPPP commented on August 27, 2024

but i use win 11

from dlib.

slothPete7773 avatar slothPete7773 commented on August 27, 2024
  • 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.

nmww avatar nmww commented on August 27, 2024

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.

ben13300 avatar ben13300 commented on August 27, 2024

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.

ben13300 avatar ben13300 commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.