python安装dlib库报错问题及解决方法
问题描述
我是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中cx_Oracle模块安装遇到的问题与解决方法
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- 安装Caffe的Python wrapper时出现问题的解决方法
- 【Python】安装python包时遇到"error: Microsoft Visual C++ 9.0 is required"问题的解决方法
- Mac系统python安装selenium以及卸载中所有问题与解决办法,还有驱动安装方法
- python MySQLdb Windows下安装教程及问题解决方法
- Python安装matplotlib所需要的软件以及问题的解决方法
- python安装cx_Oracle模块常见问题与解决方法
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- 安装MySQL以及在python3中创建数据库遇到问题的解决方法
- TensorFlow在MacOS和Windows下安装,史上最全问题解决方法(包括Mac OS系统自带Python2.7和安装的python3.7共存问题)
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- python MySQLdb Windows下安装教程及问题解决方法
- python中安装cx_Oracle过程中遇到的问题及解决方法
- Macos解决安装pip,python,scrapy,项目安装的若干问题方法
- 在Windows上安装Python2.6+MySQL 的常见问题及解决方法
- 自动化测试(python))——解决appium每次测试脚本都要安装unlock和settings两个apk问题的方法
- 安装python时MySQLdb报错的问题描述及解决方法
- 安装python环境出现的问题及解决方法
- 详解windows python3.7安装numpy问题的解决方法