
安装dlib
发布日期:2022-02-23 07:42:36
浏览次数:3
分类:技术文章
本文共 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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2023年05月27日 16时40分33秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
最新文章
go 监听windows系统信号_gocron - 定时任务管理系统
2019-12-01 13:16:36
java8根据某个字段过滤并拼接_侠说java8--Stream流操作学习笔记,都在这里了
2019-12-01 13:16:36
js如何在当前页面加载springmvc返回的页面_Spring 和 Spring MVC经典面试题及答案
2019-12-01 13:16:36
mysql数据库5.5_MySQL数据库安装Version5.5
2019-12-01 13:16:36
++递归 字符串全排列_一组数据的全排列
2019-12-01 13:16:34
2110n操作使用说明_罗茨风机使用维护大全?故常处理?操作说明
2019-12-01 13:16:34
假设检验_科学统计做决策―浅析统计方法假设检验
2019-12-01 13:16:34
平均数和均值一样吗_你真的清晰的知道什么是投资高回报吗?
2019-12-01 13:16:35
matlab 韩明距离_使用Matlab计算各种距离Distance
2019-12-01 13:16:35
cf英文名字格式好看的_cf好看的英语名字格式,有你想要的!
2019-12-01 13:16:35
python用户输入的是q么_Python基础(一):程序输入输出、判断合法用户、编写判断成绩的程序...
2019-12-01 13:16:35
苹果7pid怎么设置_苹果手机铃声怎么设置
2019-12-01 13:16:33
职场上个人的核心技术_因个人原因向单位辞职,社保都白交了?
2019-12-01 13:16:33
印象笔记三级目录_如何将5k+条笔记,按五类归类整理?
2019-12-01 13:16:33
常量元素记忆口诀_看完就用的九种快速记忆法,速度收藏
2019-12-01 13:16:33
简述er图的作用_直调光模块中的消光比(ER)和光调制幅度(OMA)
2019-12-01 13:16:33
艾特某人代码实现_JavaScript速记技巧:向着更清晰的代码迈进
2019-12-01 13:16:33
节点 移除_CEPH 日记 1 - 如何移除OSD
2019-12-01 13:16:34
动态获取某个元素的高度_DOM初识 - 获取元素方法合辑
2019-12-01 13:16:34
asa 防火墙拦截了https_简单轻量级的php的web防火墙,拦截SQL注入和XSS攻击
2019-12-01 13:16:31