linux下dlib安装

匿名 (未验证) 提交于 2019-12-02 21:56:30

背景:工作需要在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

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!