问题描述

我是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库报错的更多相关文章

  1. python安装第三方库报错visual c++ 14.0 is required

    使用python安装第三方库时报错如下: error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ ...

  2. python安装wordcloud库报错

    pip install wordcloud 安装成了这样 红彤彤的一片 解决方法 https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud 下载对应版 ...

  3. python安装第三方库报错:Cannot uninstall '***'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

    pip install --ignore-installed ${PACKAGE_NAME}

  4. pip安装第三方库报错Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))...

    pip安装第三方库时报错Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))...,详细报错见下 ...

  5. python2.7 安装pycrypto库报错

    windows + python2.7 先安装VC包 https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59 ...

  6. Python3.7安装pyaudio库报错问题及修复

    本人今天在使用python编写语音相关项目是需要引用pyaudio库,结果发现引用失败,刚开始报错内容如下: 说让我升级pip,然后我就按照提示升级了pip,然后又再次尝试安装pyaudio库,然后还 ...

  7. pycharm 安装第三方库报错:AttributeError: 'module' object has no attribute 'main'

    pip升级到 10.0.1 之后 老版的pycharm 使用pip安装第三方库的时候会报错,报错如上图所示: 其主要原因是 新版的 pip 更改了 部分api 将其中 pip.main() 改为 pi ...

  8. python 安装psutil包报错:

    报错: Failed building wheel for psutil Google得知,需要安装python-devel 和 wheel sudo dnf install python-devel ...

  9. CocoaPods升级安装三方库报错

    CocoaPods升级后(最新版本1.0.1),安装第三方库的时候会报如下错误: The dependency `AFNetworking (~> 3.1.0)` is not used in ...

  10. 使用pip安装第三方库报错记录

    今天在使用pycharm导入第三方库的时候,报了好多超时错误,还有标题中的找不到版本,应该是网络的原因,记录下解决的办法: raise ReadTimeoutError(self._pool, Non ...

随机推荐

  1. python 作用域与命名空间

    作用域 作用域分为: 全局作用域 局部作用域 在函数内部的作用域叫做局部作用域,局部作用域中的变量叫做局部变量 非函数内部的作用域叫做全局作用域,全局作用域中的变量叫做全局变量 局部作用域可以使用全局 ...

  2. 【疑难杂症】关于pycharm无法安装插件显示网络错误问题

    今天实在受不了英文的pycharm了,想着赶紧装个中文的插件,结果插件界面给我说我网络有问题 search results are not loaded check the internet conn ...

  3. 一文读懂Apache Geode缓存中间件

    目录 一.对缓存中间件的诉求 1.1 我们为什么需要缓存中间件 1.2 缓存的分类 1.1.1 弱势缓存 1.1.2 强势缓存 二.什么是Apache Geode 2.1 Apache Geode的架 ...

  4. Codeforces Round #709 Div2

    就ac了一题.QAQ掉分了我好难过. A题要画图推出来公式. B不会,现在没看到好懂得题解. C题,思路错了,给一些数,每天只能选其中一些,每个数不能被选超过k次,应该先将每天只能选一个得这个数先选上 ...

  5. POJ3662 [USACO08JAN]Telephone Lines (二分答案/分层图求最短路)

    这道题目有两种解法: 1.将每个点视为一个二元组(x,p),表示从起点到x有p条路径免费,相当于构建了一张分层图,N*k个节点,P*k条边.在这张图上用优先队列优化的SPFA算法求解,注意这里的d数组 ...

  6. 洛谷P2827 [NOIP2016 提高组] 蚯蚓 (二叉堆/队列)

    容易想到的是用二叉堆来解决,切断一条蚯蚓,其他的都要加上一个值,不妨用一个表示偏移量的delta. 1.取出最大的x,x+=delta: 2.算出切断后的两个新长度,都减去delta和q: 3.del ...

  7. MatrixOne Linux 编译文档

    MatrixOne Linux 编译文档 编译环境 硬件环境 操作系统 内存 CPU 磁盘 Windows环境下的Linux虚拟机 Linux version 3.10.0-1160.el7.x86_ ...

  8. C++编程范式(函数)

    1 // 2 // main.cpp 3 // test 4 // 5 // Created by Shaojun on 30/5/2020. 6 // Copyright 2020 Shaojun. ...

  9. python续集

    上集回顾 数据类型内置方法简介 所有的数据类型基本上都自带了一些操作以及通过点的方式调用自带的方法 整型相关操作 类型转换 int() 十进制转其他进制 bin() oct() hex() 其他进制转 ...

  10. ssh端口映射 解决服务器使用tensorboard的问题

    有时会在服务器上使用tensorboard,然而本地无法直接访问tensorboard结果网页.这时候使用端口映射即可.比如tensorboard上占用的是 6006 端口,也就是说结果在服务器的 l ...