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(’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
主要报错就是
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库报错内容请搜索好吧啦网以前的文章或继续浏览下面的相关文章希望大家以后多多支持好吧啦网!
相关文章:
1. javascript - swiper.js嵌套了swiper 初始设置不能向下一个滑动 结束后重新初始2. angular.js - angular-ui-bootstrap 报错无法使用?3. 为什么span的color非要内联样式才起作用?4. python - 如何修改twisted自带的日志输出格式?5. docker - 如何修改运行中容器的配置6. 求救一下,用新版的phpstudy,数据库过段时间会消失是什么情况?7. 如何使用git对word文档进行版本控制?8. 请问一下各位老鸟 我一直在学习独孤九贱 现在是在tp5 今天发现 这个系列视频没有实战9. 老师,请问我打开browsersync出现这个问题怎么解决啊?10. html5 - H5做的手机分享页微信更新后,分享出去不再默认显示第一个图 作为缩略图

网公网安备