python安装dlib库报错问题及解决方法
问题描述
我是debain系的linux系统没遇到这个问题,在centos系统遇到的
Collectingdlib
Downloadinghttp://mirrors.cloud.aliyuncs.com/pypi/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz(3.2MB)
100%|████████████████████████████████|3.2MB99.4MB/s
Buildingwheelsforcollectedpackages:dlib
Runningsetup.pybdist_wheelfordlib...error
Completeoutputfromcommand/usr/bin/python3-u-c"importsetuptools,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-tagcp36:
runningbdist_wheel
runningbuild
runningbuild_py
packageinitfile'dlib/__init__.py'notfound(ornotaregularfile)
runningbuild_ext
BuildingextensionforPython3.6.8(default,Aug 72019,17:28:10)
InvokingCMakesetup:'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'
--TheCcompileridentificationisGNU4.8.5
--TheCXXcompileridentificationisunknown
--CheckforworkingCcompiler:/usr/bin/cc
--CheckforworkingCcompiler:/usr/bin/cc--works
--DetectingCcompilerABIinfo
--DetectingCcompilerABIinfo-done
CMakeError:yourCXXcompiler:"CMAKE_CXX_COMPILER-NOTFOUND"wasnotfound. PleasesetCMAKE_CXX_COMPILERtoavalidcompilerpathorname.
CMakeError:yourCXXcompiler:"CMAKE_CXX_COMPILER-NOTFOUND"wasnotfound. PleasesetCMAKE_CXX_COMPILERtoavalidcompilerpathorname.
--FoundPythonInterp:/usr/bin/python3(foundversion"3.6.8")
--FoundPythonLibs:python3.6m
--PerformingTestHAS_CPP14_FLAG
主要报错就是
CMakeError:yourCXXcompiler:"CMAKE_CXX_COMPILER-NOTFOUND"wasnotfound. PleasesetCMAKE_CXX_COMPILERtoavalidcompilerpathorname.
解决办法
yuminstallcmakegcc-c++
另一个问题
另外一个地方可能会报错
fatalerror:Python.h:Nosuchfileordirectory
#include
compilationterminated.
这种报错很常见了
解决办法:
debain系
sudoaptinstallpython3-dev
rehat系
yuminstallpython3-devel
总结
到此这篇关于python安装dlib库报错问题及解决方法的文章就介绍到这了,更多相关python安装dlib库报错内容请搜索毛票票以前的文章或继续浏览下面的相关文章希望大家以后多多支持毛票票!
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:czq8825#qq.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。