安装face_recognition时发生错误错误文本:收集face_recognition [英] An error occurred while installing face_recognition Error text: Collecting face_recognition
问题描述
我想在python上启动人脸识别项目.我安装了bython并安装了pipenv.之后,当我安装"pipenv install face_recognition";外壳在安装后给我一个错误.
I want to start face recognition project on python. i installed bython and install pipenv. after this when I install " pipenv install face_recognition" shell give me a error after some installation.
(mrblack--PGk31eo)C:\ Users \ mrblack>
(mrblack--PGk31eo) C:\Users\mrblack>
pipenv install face_recognition
Installing face_recognition…
错误:安装face_recognition时发生错误!错误文本:正在收集face_recognitionRuntimeError:必须安装CMake才能构建以下扩展名:_dlib_pybind11安装失败
Error: An error occurred while installing face_recognition! Error text: Collecting face_recognition RuntimeError: CMake must be installed to build the following extensions:_dlib_pybind11 Installation Failed
推荐答案
为Ubuntu 18.04安装人脸识别模块:(尝试在其他操作系统上使用,我在18.04中使用了此功能)
For installing face-recognition module for Ubuntu 18.04: (Try for other OS, I used this for 18.04)
安装cmake: pip安装cmake
成功安装cmake后
Install cmake: pip install cmake
After cmake is successfully installed
可选:如果您没有git,请安装git
Optional: Install git if you don't have git
git clone https://github.com/davisking/dlib.git
构建主要的dlib库
cd dlib mkdir build; cd build; cmake ..; cmake --build .
构建和安装python基本知识
Build and install python essentials
cd .. python3 setup.py install
完成所有这些操作以进行验证
After all this run these to verify
python3
import dlib
现在安装face_recognition
Now install face_recognition
pip3 install face_recognition
需要一些时间,但是没关系!希望它对您有用
Takes some time but that is okay! I hope it worked for you
请参阅以下材料:
人脸识别原始存储库: https://github.com/ageitgey/face_recognition#installing-on-mac-or-linux dlib: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
face-recognition original repo: https://github.com/ageitgey/face_recognition#installing-on-mac-or-linux dlib: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
这篇关于安装face_recognition时发生错误错误文本:收集face_recognition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!