python 人脸识别库face_recognition安装错误,Running setup.py install for dlib did not run successfully

博客介绍了在安装Python人脸识别库face_recognition时遇到的问题,特别是dlib库安装失败的原因,包括版本不匹配。建议先安装cmake和Boost,然后尝试安装特定版本的dlib(如dlib-19.19.0-cp38-cp38-win_amd64.whl)。视频教程提供了详细步骤,适用于DOS和PyCharm环境。
摘要由CSDN通过智能技术生成

python 人脸识别库face_recognition安装错误,Running setup.py install for dlib did not run successfully

python 安装人脸识别库face_recognition的时候容易出错。需要依赖dlib库,但一般大家pip install dlib 都会出错,

1.查原因,安装pip install cmake 和 Boost后,再安装dlib(基本上也会失败)

2.主要原因是 dlib 库版本和 python版本不匹配。

此处有视频讲解 :15.OpenCV_Python:安装dlib库的正确方法,了解在DOS和PyCharm下pip安装的区别,瞳孔识别演示_哔哩哔哩_bilibili

3. python3.8 安装dlib ,对应的版本是 ( dlib-19.19.0-cp38-cp38-win_amd64.whl.whl)

Collecting face_recognition Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB) Requirement already satisfied: Pillow in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (9.4.0) Requirement already satisfied: face-recognition-models>=0.3.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (0.3.0) Collecting dlib>=19.7 Using cached dlib-19.24.1.tar.gz (3.2 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: Click>=6.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (8.1.3) Requirement already satisfied: numpy in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (1.24.2) Requirement already satisfied: colorama in d:\anaconda\envs\pytorch\lib\site-packages (from Click>=6.0->face_recognition) (0.4.6) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [7 lines of output] running bdist_wheel running build running build_py 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 Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib, face_recognition Running setup.py install for dlib ... error error: subprocess-exited-with-error × Running setup.py install for dlib did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running install D:\anaconda\envs\pytorch\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py 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: legacy-install-failure × Encountered error while trying to install package. ╰─> dlib note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值