Задать вопрос
@sfgh

Как решить проблему с установкой face-recognition через командную строку?

Здравствуйте, хотел установить библиотеку face-recognition с помощью команды "pip install face-recognition" однако на выходе получаю несколько ошибок в процессе:
C:\Users\markk>pip install face-recognition
Collecting face-recognition
  Using cached face_recognition-1.3.0-py2.py3-none-any.whl.metadata (21 kB)
Collecting face-recognition-models>=0.3.0 (from face-recognition)
  Using cached face_recognition_models-0.3.0-py2.py3-none-any.whl
Collecting Click>=6.0 (from face-recognition)
  Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting dlib>=19.7 (from face-recognition)
  Using cached dlib-19.24.5.tar.gz (3.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from face-recognition)
  Using cached numpy-2.0.1-cp39-cp39-win_amd64.whl.metadata (60 kB)
Collecting Pillow (from face-recognition)
  Using cached pillow-10.4.0-cp39-cp39-win_amd64.whl.metadata (9.3 kB)
Collecting colorama (from Click>=6.0->face-recognition)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Using cached numpy-2.0.1-cp39-cp39-win_amd64.whl (16.6 MB)
Using cached pillow-10.4.0-cp39-cp39-win_amd64.whl (2.6 MB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dlib)

Ранее нашел информацию, что переустановка на более старую версию python помогает решить проблему, однако не в моем случае. Как решить это ошибки?
  • Вопрос задан
  • 537 просмотров
Подписаться 1 Простой 6 комментариев
Пригласить эксперта
Ответы на вопрос 1
Mike_Ro
@Mike_Ro Куратор тега Python
Python, JS, WordPress, SEO, Bots, Adversting
C:\Users\markk>pip install face-recognition

https://github.com/ageitgey/face_recognition/issue...

This seems to be same as #1212
Using pip3 command, I am able to successfully install on windows.
pip3 install face_recognition
Reference: https://face-recognition.readthedocs.io/en/latest/...
it is face_recognition and not face-recognition in that link.


Так же пишут, что нужно поставить cmake pip install cmake.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы