解决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
目录
相关文章
|
15天前
|
iOS开发 MacOS Windows
Mac air使用Boot Camp安装win10 ,拷贝 Windows 文件时出错
Mac air使用Boot Camp安装win10 ,拷贝 Windows 文件时出错
|
5天前
|
存储 JavaScript 前端开发
Node 版本控制工具 NVM 的安装和使用(Windows)
本文介绍了NVM(Node Version Manager)的Windows版本——NVM for Windows的安装和使用方法,包括如何安装Node.js的特定版本、列出已安装版本、切换使用不同版本的Node.js,以及其他常用命令,以实现在Windows系统上对Node.js版本的便捷管理。
Node 版本控制工具 NVM 的安装和使用(Windows)
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
|
1月前
|
Windows
Windows操作系统部署安装Kerberos客户端
详细介绍了在Windows操作系统上部署安装Kerberos客户端的完整过程,包括下载安装包、安装步骤、自定义安装路径、修改环境变量、配置hosts文件和Kerberos配置文件,以及安装后的验证步骤。
43 3
Windows操作系统部署安装Kerberos客户端
|
21天前
|
SQL JavaScript 数据库
sqlite在Windows环境下安装、使用、node.js连接
sqlite在Windows环境下安装、使用、node.js连接
|
2月前
|
缓存 NoSQL Linux
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
|
29天前
|
网络安全 虚拟化 Windows
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题
|
2月前
|
Ubuntu Linux 虚拟化
安装Windows Linux 子系统的方法:适用于windows 11 版本
本文提供了在Windows 11系统上安装Linux子系统(WSL)的详细步骤,包括启用子系统和虚拟化功能、从Microsoft Store安装Linux发行版、设置WSL默认版本、安装WSL2补丁,以及完成Ubuntu的首次安装设置。
118 2
|
2月前
|
API Docker Windows
2024 Ollama 一站式解决在Windows系统安装、使用、定制服务与实战案例
这篇文章是一份关于Ollama工具的一站式使用指南,涵盖了在Windows系统上安装、使用和定制服务,以及实战案例。
2024 Ollama 一站式解决在Windows系统安装、使用、定制服务与实战案例
|
2月前
|
网络安全 Windows
windows安装ssh服务
windows安装ssh服务
24 0
下一篇
无影云桌面