python dlib和face_recognition包的安装

在尝试安装github上的人脸识别项目时,遇到了dlib和face_recognition包的安装问题。通过pip直接安装dlib失败,但通过YouTube视频提供的方法,使用特定版本的whl文件成功安装了dlib。之后,安装了face_recognition及其依赖包,如click, face_recognition_models, numpy, dlib和pillow,确保了项目的正常运行。" 137096787,13871089,GEOS_C跨平台编译指南:QT+QGIS集成,"['QT+QGIS', 'geos_c编译', 'QGIS跨平台编译', 'C++开发', '空间数据处理']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近在尝试运行一个github上很火的人脸识别项目,传送门-->https://github.com/ageitgey/face_recognition,不过在安装项目所需的一些包时出现了错误。

首先是dlib包,直接 pip install dlib会报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting dlib
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz (3.4MB)
     |████████████████████████████████| 3.4MB 1.6MB/s
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) ... error
  ERROR: Complete output from command 'D:\Anaconda3\envs\python36\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\fengzhao\\AppData\\Local\\Temp\\pip-install-0r7ug9qd\\dlib\\setup.p
y'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\fengzhao\App
Data\Local\Temp\pip-wheel-s4lri21e' --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_py
  package init file 'dlib\__init__.py' not found (or not a regular file)
  running build_ext
  Building extension for Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
  Invoking CMake setup: 'cmake C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\bu
ild\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=D:\Anaconda3\envs\python36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\build\lib.win-amd64-3
.6 -A x64'
  -- Building for: NMake Makefiles
  CMake Error in CMakeLists.txt:
    Generator
  
      NMake Makefiles
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/fengzhao/AppData/Local/Temp/pip-install-0r7ug9qd/dlib/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
  Traceback (most recent call last):
    File "<string>", line 1,
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值