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(’rn’, ’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ò)很常見了
解決辦法:
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)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. 如何解決docker宿主機(jī)無(wú)法訪問(wèn)容器中的服務(wù)?2. springboot - spring-boot-starter-thymeleaf對(duì)沒(méi)有結(jié)束符的HTML5標(biāo)簽解析出錯(cuò)3. javascript - 求助Angular 跨控制器調(diào)用方法可行嗎?4. 我 想好好學(xué)精通一門技術(shù),大家用的走過(guò)的路,幫我指點(diǎn)指點(diǎn)唄 讓我少走了彎路和坑的苦 ,自學(xué),自己摸5. html - css布局問(wèn)題,背景用用div畫的三角形是否用absolute與z-index來(lái)定位與規(guī)定在下方是否是個(gè)好方案6. 正則表達(dá)式 - nginx 正則,如何匹配不以/結(jié)尾且不以.xml .html .htm結(jié)尾7. 淺談vue生命周期共有幾個(gè)階段?分別是什么?8. index.php錯(cuò)誤,求指點(diǎn)9. Android 高德地圖如何移除添加的某個(gè)marker?10. javascript - 函數(shù)聲明和匿名函數(shù)有什么不同?(前端小白求助。。)
