解决windows10下安装dlib与face-recognition的问题

简介: 以后博客更新内容都会在oldpan.me中 github中相关问题解决方法:https://github.com/ageitgey/face_recognition/issues/175#issue-257710508 对于安装face-recognition在window的方法,在dlib的github中的issue中已经有人进行了回答,但是回答者较为复杂,且有些步骤可以简化一下。

以后博客更新内容都会在oldpan.me
github中相关问题解决方法:https://github.com/ageitgey/face_recognition/issues/175#issue-257710508
对于安装face-recognition在window的方法,在dlib的github中的issue中已经有人进行了回答,但是回答者较为复杂,且有些步骤可以简化一下。

问题原因

安装face-recognition需要首先安装dlib
windows无法直接安装dlib的原因主要是因为缺少相应的编译环境,只要安装好相应的编译环境即可。

相关软件

1、VS 2015 C++相关组件,注意,需要的是2015而不是2017,VS2017的相关组件对C++编译的支持并不好,因此必须下载安装好VS2015的C++相关组件。
注意:VS 2015 安装器默认不安装C++相关组件,需要自己选择添加安装!!
2、Boost C++ Libraries,下载好Third Party Downloads-Windows Binaries中的boost_1_66_0-msvc-14.0-64.exe,点击exe安装到C盘,到期安装目录,点击b2进行编译,编译好的文件放到了stage中。
3、安装cmake,百度直接安装即可,cmake在安装过程中切记选择添加路径到环境变量中。

问题解决

安装好上面说的三个部件后,直接运行pip install face-recognition即可,会将dlib一并安装。
出现以下信息说明安装成功。

C:\Users\dell\PycharmProjects\Pytorch-Learn>C:\Users\dell\Anaconda3\envs\my-pytorch\Scripts\pip install face-recognition
Collecting face-recognition
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fa/2d/dbb78acb411de238869451afae8387ae8200d3fe0672f6817a918e03ca49/face_recognition-1.0.0-py2.py3-none-any.whl
Requirement already satisfied: Pillow in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from face-recognition)
Requirement already satisfied: numpy in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from face-recognition)
Requirement already satisfied: face-recognition-models>=0.2.0 in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from face-recognition)
Requirement already satisfied: scipy>=0.17.0 in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from face-recognition)
Collecting dlib>=19.5 (from face-recognition)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/23/7a/891d4c46cdf755fb69eec0f06a53033d3754bf68ace5342ad56aeb540aa1/dlib-19.9.0.tar.gz
Requirement already satisfied: Click>=6.0 in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from face-recognition)
Requirement already satisfied: olefile in c:\users\dell\anaconda3\envs\my-pytorch\lib\site-packages (from Pillow->face-recognition)
Building wheels for collected packages: dlib
  Running setup.py bdist_wheel for dlib ... done
  Stored in directory: C:\Users\dell\AppData\Local\pip\Cache\wheels\5d\94\db\0ddfd06142fc4ee80b89d1e6cd158185a9bf40d93b8d92e2ee
Successfully built dlib
Installing collected packages: dlib, face-recognition
Successfully installed dlib-19.9.0 face-recognition-1.0.0
目录
相关文章
|
22天前
|
存储 虚拟化 Windows
VMware安装Windows10
本案例介绍了在Windows系统上使用VMware Workstation 17.5 Pro安装配置Windows 10虚拟机的详细步骤,包括所需设备、软件下载链接、虚拟机设置及系统安装全过程。
VMware安装Windows10
|
8天前
|
人工智能 JavaScript 开发工具
极速上手!Claude Code 原生支持 Windows 免WSL安装教程
Claude Code 现已支持 Windows 原生运行,无需 WSL 配置。本文提供详细安装教程,涵盖 Node.js 环境验证、Git 安装及 Claude Code 配置步骤,助你快速上手这一强大 AI 编程工具。
241 4
|
1月前
|
Ubuntu Unix Linux
在Windows上轻松安装和使用Ubuntu的方法详解
继续点击“Continue”按钮以继续安装流程,随后选择清理磁盘并安装操作系统的选项。 接下来,在安装过程中,你需要选择时区。为了与你的地理位置相匹配,请选择中国上海作为你的时区设置。 在安装过程中,你还需要设置计算机的名称以及账号密码。请务必牢记这些信息,因为它们将作为你登录系统的凭证。
|
6月前
|
SQL 数据库 Windows
YashanDB Windows客户端安装
本文介绍YashanDB客户端(Windows)的安装、使用及卸载步骤。首先,下载并解压软件包至本地路径,配置环境变量。接着,通过cmd窗口使用yasql命令连接数据库,执行SQL操作。最后,卸载时删除相关环境变量和客户端目录。更多功能请参考官方文档。
YashanDB Windows客户端安装
|
1月前
|
Ubuntu Linux Windows
如何在Ubuntu系统中安装Wine,借此来运行Windows程序
熟悉的登录画面出现,在Ubuntu系统中扫描登录微信程序。
|
1月前
|
Ubuntu Linux Shell
手把手教你安装适用于Linux的Windows子系统——Ubuntu
重启完成,你看看重新打开Ubuntu是不是发生了变化,等待几分钟,系统配置完成,根据提示设置用户名和密码即可
|
1月前
|
Ubuntu Linux 数据安全/隐私保护
Windows上快速安装Linux子系统Ubuntu
Installing, this may take a few minutes...WslRegisterDistribution failed with error: 0x800701bcError: 0x800701bc WSL 2 ?????????????????? https://aka.ms/wsl2kernelPress any key to continue... 原因是 wsl1 升级到 wsl2 之后,内核却没有升级。 解决:下载最新的wsl安装包(wsl安装包)