安装dlib
发布日期:2022-02-23 07:42:36
浏览次数:11
分类:技术文章
本文共 7733 字,大约阅读时间需要 25 分钟。
1,python3 pip install dlib报错:
Collecting dlib Downloading https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz (3.4MB) |████████████████████████████████| 3.4MB 14kB/sBuilding wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error ERROR: Complete output from command 'f:\python36\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\fu\\AppData\\Local\\Temp\\pip-install-t50q34ym\\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 'C:\Users\fu\AppData\Local\Temp\pip-wheel-g2i4oztb' --python-tag cp36: ERROR: running bdist_wheel running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Traceback (most recent call last): File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 120, in get_cmake_version out = subprocess.check_output(['cmake', '--version']) File "f:\python36\lib\subprocess.py", line 356, in check_output **kwargs).stdout File "f:\python36\lib\subprocess.py", line 423, in run with Popen(*popenargs, **kwargs) as process: File "f:\python36\lib\subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "f:\python36\lib\subprocess.py", line 1017, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 261, in 'Topic :: Software Development', File "f:\python36\lib\site-packages\setuptools\__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "f:\python36\lib\distutils\core.py", line 148, in setup dist.run_commands() File "f:\python36\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "f:\python36\lib\site-packages\wheel\bdist_wheel.py", line 192, in run self.run_command('build') File "f:\python36\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "f:\python36\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "f:\python36\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 129, in run cmake_version = self.get_cmake_version() File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 125, in get_cmake_version "\n*******************************************************************\n") RuntimeError: ******************************************************************* CMake must be installed to build the following extensions: dlib ******************************************************************* ---------------------------------------- ERROR: Failed building wheel for dlib Running setup.py clean for dlibFailed to build dlibInstalling collected packages: dlib Running setup.py install for dlib ... error ERROR: Complete output from command 'f:\python36\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\fu\\AppData\\Local\\Temp\\pip-install-t50q34ym\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\fu\AppData\Local\Temp\pip-record-4kwg7hfv\install-record.txt' --single-version-externally-managed --compile: ERROR: running install running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Traceback (most recent call last): File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 120, in get_cmake_version out = subprocess.check_output(['cmake', '--version']) File "f:\python36\lib\subprocess.py", line 356, in check_output **kwargs).stdout File "f:\python36\lib\subprocess.py", line 423, in run with Popen(*popenargs, **kwargs) as process: File "f:\python36\lib\subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "f:\python36\lib\subprocess.py", line 1017, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File " ", line 1, in File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 261, in 'Topic :: Software Development', File "f:\python36\lib\site-packages\setuptools\__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "f:\python36\lib\distutils\core.py", line 148, in setup dist.run_commands() File "f:\python36\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "f:\python36\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "f:\python36\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "f:\python36\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "f:\python36\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "f:\python36\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "f:\python36\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 129, in run cmake_version = self.get_cmake_version() File "C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\setup.py", line 125, in get_cmake_version "\n*******************************************************************\n") RuntimeError: ******************************************************************* CMake must be installed to build the following extensions: dlib ******************************************************************* ----------------------------------------ERROR: Command "'f:\python36\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\fu\\AppData\\Local\\Temp\\pip-install-t50q34ym\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\fu\AppData\Local\Temp\pip-record-4kwg7hfv\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\fu\AppData\Local\Temp\pip-install-t50q34ym\dlib\WARNING: You are using pip version 19.1, however version 19.1.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command.
安装dlib前需要先安装cmake 和boost。然后才能正确安装dlib
pip install boostpip install cmakepip install dlib
有时候安装dlib会出现一长串错误,有可能是版本问题
pip install dlib==19.6.1
最后测试,安装成功。
转载地址:https://blog.csdn.net/weixin_42781055/article/details/100526261 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
网站不错 人气很旺了 加油
[***.192.178.218]2024年04月17日 03时09分09秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
系统架构设计笔记(64)—— 嵌入式系统设计
2019-04-26
系统架构设计笔记(65)—— 项目的范围、时间与成本
2019-04-26
系统架构设计笔记(66)—— 配置管理与文档管理
2019-04-26
说说 Python 元组的高级用法
2019-04-26
系统架构设计笔记(66)—— 配置管理与文档管理
2019-04-26
系统架构设计笔记(67)—— 软件需求管理
2019-04-26
系统架构设计笔记(68)—— 软件开发的质量与风险
2019-04-26
系统架构设计笔记(69)—— 人力资源管理
2019-04-26
系统架构设计笔记(70)—— 软件运行评价与过程改进
2019-04-26
系统架构设计笔记(71)—— 信息系统概述
2019-04-26
说说 Canvas 的旋转功能
2019-04-26
说说 Canvas 的缩放功能
2019-04-26
系统架构设计笔记(72)—— 信息系统工程
2019-04-26
系统架构设计笔记(73)—— 政府信息化与电子政务
2019-04-26
SWIFT入门 Dictionary
2019-04-26
生死6小时!!!!!!!!!!!!!!!!1
2019-04-26
段永平大佬!
2019-04-26
mysql-connector-java与Mysql、Java的对应版本
2019-04-26
MySQL 表锁、行锁、间隙锁、页锁介绍分析
2019-04-26
codeforces 789A(数学)
2019-04-26