python安装dlib库报错问题及解决方法


Posted in Python onMarch 16, 2020

问题描述

我是debain 系的linux系统没遇到这个问题,在centos系统遇到的

Collecting dlib
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz (3.2MB)
    100% |????????????????????????????????| 3.2MB 99.4MB/s
Building wheels for collected packages: dlib
  Running setup.py bdist_wheel for dlib ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ld86u12i/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp0zu3_xkcpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  package init file 'dlib/__init__.py' not found (or not a regular file)
  running build_ext
  Building extension for Python 3.6.8 (default, Aug  7 2019, 17:28:10)
  Invoking CMake setup: 'cmake /tmp/pip-build-ld86u12i/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-ld86u12i/dlib/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release'
  -- The C compiler identification is GNU 4.8.5
  -- The CXX compiler identification is unknown
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
  CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
  -- Found PythonInterp: /usr/bin/python3 (found version "3.6.8")
  -- Found PythonLibs: python3.6m
  -- Performing Test HAS_CPP14_FLAG

主要报错就是

  CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

解决办法

yum install cmake gcc-c++

另一个问题
另外一个地方可能会报错

fatal error: Python.h: No such file or directory
 #include <Python.h>
                   
compilation terminated.

这种报错很常见了

解决办法:

debain系

sudo apt install python3-dev

rehat系

yum install python3-devel

总结

到此这篇关于python安装dlib库报错问题及解决方法的文章就介绍到这了,更多相关python安装dlib库报错内容请搜索三水点靠木以前的文章或继续浏览下面的相关文章希望大家以后多多支持三水点靠木!

Python 相关文章推荐
Python实现删除Android工程中的冗余字符串
Jan 19 Python
Python脚本实现下载合并SAE日志
Feb 10 Python
python实现各进制转换的总结大全
Jun 18 Python
python中关于for循环的碎碎念
Jun 30 Python
Python排序搜索基本算法之插入排序实例分析
Dec 11 Python
Python实现矩阵相乘的三种方法小结
Jul 26 Python
python学习开发mock接口
Apr 28 Python
详解Python的循环结构知识点
May 20 Python
Django框架视图函数设计示例
Jul 29 Python
python 并发编程 非阻塞IO模型原理解析
Aug 20 Python
使用OpenCV实现仿射变换—缩放功能
Aug 29 Python
python实现高斯判别分析算法的例子
Dec 09 Python
使用python图形模块turtle库绘制樱花、玫瑰、圣诞树代码实例
Mar 16 #Python
关于win10在tensorflow的安装及在pycharm中运行步骤详解
Mar 16 #Python
Python3.6 中的pyinstaller安装和使用教程
Mar 16 #Python
python pandas利用fillna方法实现部分自动填充功能
Mar 16 #Python
Python Flask上下文管理机制实例解析
Mar 16 #Python
Python threading.local代码实例及原理解析
Mar 16 #Python
python实现ssh及sftp功能(实例代码)
Mar 16 #Python
You might like
PHP开发文件系统实例讲解
2006/10/09 PHP
PHP中::、-&amp;gt;、self、$this几种操作符的区别介绍
2013/04/24 PHP
php ios推送(代码)
2013/07/01 PHP
PHP has encountered a Stack overflow问题解决方法
2014/11/03 PHP
WordPress主题制作之模板文件的引入方法
2015/12/28 PHP
Symfony2框架学习笔记之HTTP Cache用法详解
2016/03/18 PHP
PHP中的self关键字详解
2019/06/23 PHP
laravel 修改记住我功能的cookie保存时间的方法
2019/10/14 PHP
PHP的new static和new self的区别与使用
2019/11/27 PHP
替代window.event.srcElement效果的可兼容性的函数
2009/12/18 Javascript
最好用的省市二级联动 原生js实现你值得拥有
2013/09/22 Javascript
JavaScript原型链示例分享
2014/01/26 Javascript
jQuery大于号(&gt;)选择器的作用解释
2015/01/13 Javascript
json对象转为字符串,当做参数传递时加密解密的实现方法
2016/06/29 Javascript
js判断radiobuttonlist的选中值显示/隐藏其它模块的实现方法
2016/08/25 Javascript
jQuery基于ajax操作json数据简单示例
2017/01/05 Javascript
Avalonjs双向数据绑定与监听的实例代码
2017/06/23 Javascript
深入解析Vue 组件命名那些事
2017/07/18 Javascript
基于Vue实例生命周期(全面解析)
2017/08/16 Javascript
浅谈angular4.0中路由传递参数、获取参数最nice的写法
2018/03/12 Javascript
JavaScript 作用域实例分析
2019/10/02 Javascript
[01:02:20]Mineski vs TNC 2019国际邀请赛小组赛 BO2 第二场 8.15
2019/08/16 DOTA
Python中的单行、多行、中文注释方法
2018/07/19 Python
python环境路径配置以及命令行运行脚本
2019/04/02 Python
Python Lambda函数使用总结详解
2019/12/11 Python
Python基础之变量基本用法与进阶详解
2020/01/03 Python
python实现学生管理系统开发
2020/07/24 Python
Python利用命名空间解析XML文档
2020/08/10 Python
几道数据库的概念性面试题
2014/05/30 面试题
党员先锋岗事迹材料
2014/05/08 职场文书
银行授权委托书样本
2014/10/13 职场文书
2015年元旦主持词结束语
2014/12/14 职场文书
停电通知范文
2015/04/16 职场文书
民事起诉书范本
2015/05/19 职场文书
四群教育工作总结
2015/08/10 职场文书
小学一年级班主任工作经验交流材料
2015/11/02 职场文书