python安裝dlib庫(kù)報(bào)錯(cuò)問(wèn)題及解決方法
問(wèn)題描述
我是debain 系的linux系統(tǒng)沒(méi)遇到這個(gè)問(wèn)題,在centos系統(tǒng)遇到的
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
主要報(bào)錯(cuò)就是
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++
另一個(gè)問(wèn)題
另外一個(gè)地方可能會(huì)報(bào)錯(cuò)
fatal error: Python.h: No such file or directory
#include <Python.h>
compilation terminated.
這種報(bào)錯(cuò)很常見(jiàn)了
解決辦法:
debain系
sudo apt install python3-dev
rehat系
yum install python3-devel
總結(jié)
到此這篇關(guān)于python安裝dlib庫(kù)報(bào)錯(cuò)問(wèn)題及解決方法的文章就介紹到這了,更多相關(guān)python安裝dlib庫(kù)報(bào)錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
從Python程序中訪問(wèn)Java類的簡(jiǎn)單示例
這篇文章主要介紹了從Python程序中訪問(wèn)Java類的簡(jiǎn)單示例,包括給出了在安卓開(kāi)發(fā)中的一個(gè)短小示例,需要的朋友可以參考下2015-04-04
linux環(huán)境下安裝python虛擬環(huán)境及注意事項(xiàng)
這篇文章主要介紹了linux環(huán)境下安裝python虛擬環(huán)境,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-01-01
小學(xué)生也能看懂的python語(yǔ)法之循環(huán)語(yǔ)句精解
這篇文章主要介紹了詳解Python中的條件,循環(huán)語(yǔ)句,包括while循環(huán)for循環(huán),循環(huán)語(yǔ)句是學(xué)習(xí)各個(gè)編程語(yǔ)言的最基本的基礎(chǔ)知識(shí),需要的朋友可以參考下2021-09-09
python實(shí)現(xiàn)提取COCO,VOC數(shù)據(jù)集中特定的類
這篇文章主要介紹了python實(shí)現(xiàn)提取COCO,VOC數(shù)據(jù)集中特定的類,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2020-03-03
Python中uuid模塊的應(yīng)用實(shí)例詳解
這篇文章主要介紹了Python中uuid模塊應(yīng)用的相關(guān)資料,該模塊提供了多種方法生成UUID,包括uuid1()、uuid3()、uuid4()和uuid5(),并解釋了UUID的格式,UUID在數(shù)據(jù)庫(kù)、分布式系統(tǒng)和網(wǎng)絡(luò)協(xié)議中廣泛應(yīng)用,是處理唯一標(biāo)識(shí)符的有力工具,需要的朋友可以參考下2024-11-11
Python使用Flask-SQLAlchemy連接數(shù)據(jù)庫(kù)操作示例
這篇文章主要介紹了Python使用Flask-SQLAlchemy連接數(shù)據(jù)庫(kù)操作,簡(jiǎn)單介紹了flask、Mysql-Python以及Flask-SQLAlchemy的安裝方法,并結(jié)合實(shí)例形式分析了基于Flask-SQLAlchemy的數(shù)據(jù)庫(kù)連接相關(guān)操作技巧,需要的朋友可以參考下2018-08-08
Django 解決阿里云部署同步數(shù)據(jù)庫(kù)報(bào)錯(cuò)的問(wèn)題
這篇文章主要介紹了Django 解決阿里云部署同步數(shù)據(jù)庫(kù)報(bào)錯(cuò)的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2020-05-05
python設(shè)計(jì)tcp數(shù)據(jù)包協(xié)議類的例子
今天小編就為大家分享一篇python設(shè)計(jì)tcp數(shù)據(jù)包協(xié)議類的例子,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-07-07

