【python学习】python3.6 安装dlib问题及解决方式

python3.6 安装dlib问题及解决方式

  • conda 创建环境
  • dlib安装

conda 创建环境

本文指导在Linux下的安装有效。
conda create --name 你取的环境名 python=3.6.12(选择python版本)

dlib安装

# 从清华源安装
pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple/

出现报错
【python学习】python3.6 安装dlib问题及解决方式_第1张图片
这是因为没有预先安装Cmake和Boost引起的,
pip install Cmake -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install Boost -i https://pypi.tuna.tsinghua.edu.cn/simple/
安装成功后,再次运行

# 从清华源安装
pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple/

出现报错
在这里插入图片描述
版本错误,检查python版本3.6.12,选择对应的dlib版本18

# 从清华源安装
pip install dlib==18.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/

搞定!
Successfully installed dlib-18.17.100

你可能感兴趣的:(python学习,python,tensorflow,pycharm)