python安装dlib库报错问题及解决方法
作者:Hello_wshuo 发布时间:2023-01-27 16:24:41
问题描述
我是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
来源:https://blog.csdn.net/chouzhou9701/article/details/104566650
猜你喜欢
- 前言在遇到三维数据时,三维图像能给我们对数据带来更加深入地理解。python的matplotlib库就包含了丰富的三维绘图工具。1.创建三维
- 使用python进行websocket的客户端压力测试,这个代码是从github上 找到。然后简单修改了下。大神运用了进程池,以及线程池的内
- 下面两个函数实现了对字符串中数字的判断。function isnaw(str) f
- 使用WSH调用系统的Ping命令,将Ping的结果重定向到一个文本文件中去,再把文本文件显示到网页中具体做法如下:首先, 建一个.BAT文件
- 本次主要是使用selenium模拟登录网页端的TX新闻,本来最开始是模拟请求的,但是某一天突然发现,部分账号需要经过滑块验证才能正常登录,如
- 在二维矩阵间的运算:class torch.nn.Conv2d(in_channels, out_channels, kernel_size
- SQL Server数据库查询优化的常用方法总结:本文中,abigale代表查询字符串,ada代表数据表名,alice代表字段名。技巧一:问
- 本文介绍了asp中 adpbe.stream 的语法,各种参数使用说明,方便大家查阅。更多请看:VBScript 速查手册(语言参考) ch
- 一、简介urllib 库,它是 Python 内置的 HTTP 请求库,不需要额外安装即可使用,它包含四个模块:`request` 请求模块
- 中国互联网协会与Google(谷歌)公司联合主办“Internet+ 互联网世纪论坛”,AJAX技术的发明人Jesse James Garr
- 如何终止浏览器的 CAHCE 页面?Function Redirect( NewURL ) If&n
- 本文实例讲述了python计算时间差的方法。分享给大家供大家参考。具体分析如下:1、问题:给定你两个日期,如何计算这两个日期之间间隔几天,几
- 用Python + PyQT写的一个系统桌面时钟,刚学习Python,写的比较简陋,但是基本的功能还可以。功能:①窗体在应用程序最上层,不用
- 遇到一个难题,在无物理键盘情况下,通过页面软键盘在页面文本框输入汉字,不知道51js的各位大牛有没有遇到过这种需求,如果遇到过是如何解决的,
- 1、主题毫无疑问Pycharm是一个具有强大快捷键系统的IDE,这就意味着你在Pycharm中的任何操作,例如打开一个文件、切换编辑区域等,
- 如果网站只开了80端口,你会发现下面的方法是比较有用的,其中用的方法几乎都不是我发现的,文总包括一些注入时的个人经验和技巧方法可以说有4种(
- 1、函数实现# -*- coding: utf-8 -*-def tail(filename, n=10): with open
- 在当今用户的显示器越来越大的今天,之前的1024*768固宽布局有点越来越不合时宜,对大屏幕的用户而言,两侧空空的留白给人第一眼的印象是严重
- 本文将以Mysql举例,介绍sqlalchemy的基本用法。其中,Python版本为2.7,sqlalchemy版本为1.1.6。一. 介绍
- 项目中大量用到图片加载,由于图片太大,加载速度很慢,因此需要对文件进行统一压缩第一种 一:安装包python -m pip ins