ERROR: Failed building wheel for dlib

ubuntu 安装dlib ERROR: Failed building wheel for dlib

报错信息
pip install  -i https://pypi.douban.com/simple dlib

Looking in indexes: https://pypi.douban.com/simple
Collecting dlib==18.17.100
  Using cached https://pypi.doubanio.com/packages/2e/63/801499a0aa588ac29b3400477848caa43e6cbb76af3c1568fcd4b0c21cfd/dlib-18.17.100.zip (4.4 MB)
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/anaconda3/envs/face_pretty/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-4mrjodat
       cwd: /tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/
  Complete output (29 lines):
  running bdist_wheel
  running build
  Detected Python architecture: 64bit
  Configuring cmake ...
  CMake Warning (dev) in CMakeLists.txt:
    No project() command is present.  The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command.  Add a line of
    code such as
      project(ProjectName)
    near the top of the file, but after cmake_minimum_required().
    CMake is pretending there is a "project(Project)" command on the first
    line.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  -- The C compiler identification is GNU 9.3.0
  -- The CXX compiler identification is unknown
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  CMake Error in CMakeLists.txt:
    No CMAKE_CXX_COMPILER could be found.
    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/tools/python/build/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/tools/python/build/CMakeFiles/CMakeError.log".
  error: cmake configuration failed!
  ----------------------------------------
  ERROR: Failed building wheel for dlib
  Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
    Running setup.py install for dlib ... error
    ERROR: Command errored out with exit status 1:
     command: /root/anaconda3/envs/face_pretty/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gm4__qrg/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/face_pretty/include/python3.7m/dlib
         cwd: /tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/
    Complete output (30 lines):
    running install
    running build
    Detected Python architecture: 64bit
    Removing build directory /tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/./tools/python/build
    Configuring cmake ...
    CMake Warning (dev) in CMakeLists.txt:
      No project() command is present.  The top-level CMakeLists.txt file must
      contain a literal, direct call to the project() command.  Add a line of
      code such as
        project(ProjectName)
      near the top of the file, but after cmake_minimum_required().
      CMake is pretending there is a "project(Project)" command on the first
      line.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    -- Detecting C compile features - done
    CMake Error in CMakeLists.txt:
      No CMAKE_CXX_COMPILER could be found.
      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.
    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/tools/python/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/tools/python/build/CMakeFiles/CMakeError.log".
    error: cmake configuration failed!
    ----------------------------------------
ERROR: Command errored out with exit status 1: /root/anaconda3/envs/face_pretty/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2vvtrutd/dlib_bc0b40ba89e7439a93c82c67e195f1a2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gm4__qrg/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/face_pretty/include/python3.7m/dlib Check the logs for full command output.
解决办法
pip install boost
pip install cmake
apt install python-dev
apt install build-essential # ubuntu c编译环境模块
欢迎大家交流学习,任何问题都可以留言
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值