返回顶部
首页 > 资讯 > 后端开发 > Python >python之dlib包安装失败问题及解决
  • 345
分享到

python之dlib包安装失败问题及解决

pythondlib包安装失败pythondlib包dlib包安装失败 2023-05-19 12:05:10 345人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

目录dlib包安装失败 pythonPython安装dlib库时报‘ERROR: CMake must be installed to build dlib’

dlib包安装失败 python

安装dlib时报错

Running setup.py install for dlib … error
ERROR: Command errored out with exit status 1:
command: ‘d:\softwaresetup\python\python.exe’ -u -c 'import sys, setuptools, tokenize; sys.argv[0] =

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\yaoqifa\AppData\Local\Temp\pip-install-u6nbqcm2\dlib\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "C:\Users\yaoqifa\AppData\Roaming\Python\python37\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "d:\softwaresetup\python\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "d:\softwaresetup\python\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "d:\softwaresetup\python\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\yaoqifa\AppData\Roaming\Python\Python37\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "d:\softwaresetup\python\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "d:\softwaresetup\python\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "d:\softwaresetup\python\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "d:\softwaresetup\python\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "d:\softwaresetup\python\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "d:\softwaresetup\python\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\yaoqifa\AppData\Local\Temp\pip-install-u6nbqcm2\dlib\setup.py", line 129, in run
    cmake_version = self.get_cmake_version()
  File "C:\Users\yaoqifa\AppData\Local\Temp\pip-install-u6nbqcm2\dlib\setup.py", line 125, in get_cmake_version
    "\n*******************************************************************\n")
RuntimeError:
*******************************************************************
 CMake must be installed to build the following extensions: dlib
*******************************************************************

其实是缺少Cmake包和CBoot包,安装这两个包即可

python -m pip install CMake -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install Boost -i Https://pypi.tuna.tsinghua.edu.cn/simple/

安装之后再安装dlib即可

python -m pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple/

在这里插入图片描述

python安装dlib库时报‘ERROR: CMake must be installed to build dlib’

使用python安装dlib库时,会遇到下面的错误:

在这里插入图片描述

这个提示表示你没有安装Cmake编译,所以需要先安装cmake:

pip install cmake

在这里插入图片描述

安装成功后,再次安装dlib即可。

pip install dlib

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程网。

--结束END--

本文标题: python之dlib包安装失败问题及解决

本文链接: https://lsjlt.com/news/213167.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作