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實(shí)現(xiàn)解壓當(dāng)天創(chuàng)建的ZIP文件到指定文件夾中
這篇文章主要為大家詳細(xì)介紹了Python如何實(shí)現(xiàn)解壓當(dāng)天創(chuàng)建的ZIP文件到指定文件夾中,文中的示例代碼講解詳細(xì),需要的小伙伴可以參考下2024-03-03Python實(shí)現(xiàn)ElGamal加密算法的示例代碼
ElGamal加密算法是一個(gè)基于迪菲-赫爾曼密鑰交換的非對(duì)稱加密算法。這篇文章通過(guò)示例代碼給大家介紹Python實(shí)現(xiàn)ElGamal加密算法的相關(guān)知識(shí),感興趣的朋友一起看看吧2020-06-06Python編程實(shí)現(xiàn)兩個(gè)文件夾里文件的對(duì)比功能示例【包含內(nèi)容的對(duì)比】
這篇文章主要介紹了Python編程實(shí)現(xiàn)兩個(gè)文件夾里文件的對(duì)比功能,包含內(nèi)容的對(duì)比操作,涉及Python文件與目錄的遍歷、比較、運(yùn)算等相關(guān)操作技巧,需要的朋友可以參考下2017-06-06python發(fā)qq消息轟炸虐狗好友思路詳解(完整代碼)
因?yàn)槲业哪硞€(gè)好友在情人節(jié)的時(shí)候秀恩愛(ài),所以我靈光一閃制作了qq消息轟炸并記錄了下來(lái)。本文給大家分享python發(fā)qq消息轟炸虐狗好友思路詳解,感興趣的朋友一起看看吧2020-02-02對(duì)pandas中iloc,loc取數(shù)據(jù)差別及按條件取值的方法詳解
今天小編就為大家分享一篇對(duì)pandas中iloc,loc取數(shù)據(jù)差別及按條件取值的方法詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-11-11基于Python實(shí)現(xiàn)原創(chuàng)程序猿乘風(fēng)破浪小游戲
最近學(xué)習(xí)了一丁點(diǎn)Pygame技能,感覺(jué)有點(diǎn)上頭,一波操作創(chuàng)作“程序猿乘風(fēng)破浪”游戲一款,文中的示例代碼講解詳細(xì),希望大家能夠喜歡2023-02-02python函數(shù)缺省值與引用學(xué)習(xí)筆記分享
有關(guān)一個(gè)在函數(shù)參數(shù)設(shè)置缺省值與引用的問(wèn)題,這個(gè)問(wèn)題是大多數(shù)Pythoner可能會(huì)忽視的問(wèn)題,作個(gè)筆記,以備后閱,同時(shí)供需要的朋友參考2013-02-02通過(guò)Python的gtts庫(kù)將文字轉(zhuǎn)為音頻的操作方法
文字轉(zhuǎn)音頻可以幫助視覺(jué)障礙者通過(guò)聽(tīng)取聲音來(lái)獲取信息,也可以幫助人們方便地聽(tīng)取一些長(zhǎng)篇文章或?qū)W習(xí)資料,節(jié)省閱讀時(shí)間和疲勞,這篇文章主要介紹了通過(guò)Python的gtts庫(kù)將文字轉(zhuǎn)為音頻的方法,需要的朋友可以參考下2023-05-05