人脸识别《一、window 下载Dlib库》

1.创建虚拟环境

conda create -n yolo python=3.10

  这边创建的python版本需要跟后续安装dlib的whl python版本对应,不然会提示不支持。

 

2.激活虚拟环境

conda activate dlib

 

3.相关依赖安装

pip install cmake
pip install boots

 

报错: 安装boots提示

(dlib) C:\Users\ericzhuang\Desktop>pip install boots
ERROR: Could not find a version that satisfies the requirement boots (from versions: none)
ERROR: No matching distribution found for boots

解决:

pip install dlib  -i https://pypi.douban.com/simple

其他国内镜像源

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

 

4.dlib安装

  从https://pypi.org/simple/dlib/  下载dlib的whl

   需要注意python的版本需要跟我们安装的python版本对应,操作系统32或64也要对应一下。否则会提示不支持。

pip install  对应的.whl

或者

pip install dlib

  这两种看看哪种可以。

 

然后执行python,输入

import dlib

   这样就表示安装成功

 

5.下载人脸模型

http://dlib.net/files/

 

posted @ 2023-04-27 14:41  一个不知道干嘛的小萌新  阅读(166)  评论(0编辑  收藏  举报