加微信进交流群:xituxiaoshutong100

windows安装dlib

ML/DL 迷途小书童 0评论

环境

pip安装dlib报错

默认情况下执行pip install dlib来安装的话,就会出现如下错误

  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\xugaoxiang\anaconda3\envs\fr\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\XUGAOX~1\\AppData\\Local\\Temp\\pip-ins
tall-n0nw7x_4\\dlib_7529a8f8db564d54955c2f9c64611035\\setup.py'"'"'; __file__='"'"'C:\\Users\\XUGAOX~1\\AppData\\Local\\Temp\\pip-install-n0nw7x_4\\dlib_7529a8f8db564d54955c
2f9c64611035\\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\XUGAOX~1\AppData\Local\Temp\pip-wheel-e08dcg0k'
       cwd: C:\Users\XUGAOX~1\AppData\Local\Temp\pip-install-n0nw7x_4\dlib_7529a8f8db564d54955c2f9c64611035\
  Complete output (8 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
  running build_ext

  ERROR: CMake must be installed to build dlib

  ----------------------------------------
  ERROR: Failed building wheel for dlib

解决方法

这是因为系统中缺少cmake编译工具,我们来到cmake的官方下载地址 https://cmake.org/download/,傻瓜式安装后即可

最后执行安装命令

pip install dlib

windows dlib installation

喜欢 (0)
发表我的评论
取消评论

表情