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 相关文章推荐
Python3实现将文件树中所有文件和子目录归档到tar压缩文件的方法
May 22 Python
python获取命令行输入参数列表的实例代码
Jun 23 Python
python虚拟环境迁移方法
Jan 03 Python
详解Python time库的使用
Oct 10 Python
Python可变参数会自动填充前面的默认同名参数实例
Nov 18 Python
python飞机大战pygame游戏背景设计详解
Dec 17 Python
Python dict和defaultdict使用实例解析
Mar 12 Python
Python爬虫谷歌Chrome F12抓包过程原理解析
Jun 04 Python
PyQt5 QThread倒计时功能的实现代码
Apr 02 Python
python使用XPath解析数据爬取起点小说网数据
Apr 22 Python
python基础之文件处理知识总结
May 23 Python
pandas中pd.groupby()的用法详解
Jun 16 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
短波的认识
2021/03/01 无线电
浅析PKI加密解密 OpenSSL
2013/07/01 PHP
初识php MVC
2014/09/10 PHP
PHP实现发送邮件的方法(基于简单邮件发送类)
2015/12/17 PHP
使用JavaScript switch case 另类写法
2010/03/14 Javascript
js 字符串转换成数字的三种方法
2013/03/23 Javascript
微信分享的标题、缩略图、连接及描述设置方法
2014/10/14 Javascript
jquery插件hiAlert实现网页对话框美化
2015/05/03 Javascript
JavaScript编程中布尔对象的基本使用
2015/10/25 Javascript
Javascript 6里的4个新语法
2016/08/25 Javascript
NodeJS远程代码执行
2016/08/28 NodeJs
微信小程序开发之视频播放器 Video 弹幕 弹幕颜色自定义实例
2016/12/08 Javascript
JS高级运动实例分析
2016/12/20 Javascript
详解Angular路由 ng-route和ui-router的区别
2017/05/22 Javascript
使用Webpack提高Vue.js应用的方式汇总(四种)
2017/07/10 Javascript
详解webpack+express多页站点开发
2017/12/22 Javascript
vue.js计算属性computed用法实例分析
2018/07/06 Javascript
NodeJs项目中关闭ESLint的方法
2018/08/09 NodeJs
解决iView Table组件宽度只变大不变小的问题
2020/11/13 Javascript
利用JavaScript模拟京东按键输入功能
2020/12/01 Javascript
JavaScript 绘制饼图的示例
2021/02/19 Javascript
Python数据分析中Groupby用法之通过字典或Series进行分组的实例
2017/12/08 Python
Python中的函数式编程:不可变的数据结构
2018/10/08 Python
django项目用higcharts统计最近七天文章点击量
2019/08/17 Python
python multiprocessing模块用法及原理介绍
2019/08/20 Python
python科学计算之numpy——ufunc函数用法
2019/11/25 Python
美国领先的个性化礼品商城:Personalization Mall
2019/07/27 全球购物
金融专业个人求职信
2013/09/22 职场文书
机电一体化自荐信
2013/12/10 职场文书
项目采购员岗位职责
2014/04/15 职场文书
十佳标兵事迹材料
2014/08/18 职场文书
限期整改通知书
2015/04/22 职场文书
祝酒词范文
2015/08/12 职场文书
2016公司中秋节寄语
2015/12/07 职场文书
Python基本知识点总结
2022/04/07 Python
Win11无法访问设备和打印机 如何解决页面空白
2022/04/09 数码科技