linux下dlib安装

背景:工作需要在linux环境下安装dlib,conda安装完成后再pip里面找不到dlib,所以导包失败,因此尝试用dlib的源码安装

1、源码下载:

网址:https://pypi.org/simple/dlib/

我的是python3.6.6,试了不少次才发现19.15.0可以使用,python3.7可以用19.17.0

 

2、下载完成后解压,安装

 python setup.py install 

 

可能遇到的问题:

 1、AttributeError: Module Pip has no attribute 'main' 

原因:版本不对,比如我之前用19.8.1版本就不可以,具体原因没有深究

 

2、 Cannot find appropriate C compiler on this system. 

解决:缺少gcc, suao apt install gcc 

 

3、 Compile error: Cannot find a C++ compiler that supports both C++11 and the specified C++ flags 

解决: sudo apt-get install g++ 

 

4、 Cannot find appropriate Makefile processor on this system 

解决:缺少make, sudo apt install make 

 

5、 CMake must be installed to build the following extensions: dlib 

解决:缺少cmake  下载:https://cmake.org/download/    , 解压后:

./bootstrap
make && make install

 

转载于:https://www.cnblogs.com/foreveyzy/p/11455094.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值