安装dlib包出现各种问题解决(超简单,亲测成功)

安装dlib,然后各种报错,

什么cmake没装啊,

什么boost没装啊,然后都试了一遍,没解决

 

最后找到一个最合适的方法。(不用下载杂七杂八的)

1.首先下载文件dlib-19.7.0-cp36-cp36m-win_amd64.whl,在如下的链接中

链接: https://pan.baidu.com/s/1pz_mrmRTxppyRT2cTwtVIw 提取码: uc1u

py3.7链接: https://pan.baidu.com/s/1MKqW7WH2XP-J8MOLeq3cDA 提取码: rfh8

2.将其放到任意的路径下,然后通过命令行进入到该目录下,然后运行代码:

pip install dlib-19.7.0-cp36-cp36m-win_amd64.whl

之后回车安装即可。

错误信息很多

错误1

D:\Users\install-DLIB>pip install dlib-19.7.0-cp36-cp36m-win_amd64.whl
ERROR: dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
解决方法

版本不匹配查看python的版本是否匹配

我的py是3.7下载的是3.6

重新下载

Looking in indexes: http://pypi.douban.com/simple
Collecting dlib==19.0.0
  Downloading http://pypi.doubanio.com/packages/98/04/a42d2b901f2c456f86f3c8ace36e3df64d21d7f368b1cac468489205e850/dlib-19.0.0.tar.gz (7.8 MB)
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py): started
  Building wheel for dlib (setup.py): finished with status 'error'
  Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
    Running setup.py install for dlib: started
    Running setup.py install for dlib: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\wei\.virtualenvs\pyqt51-EL5sW8oD\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\wei\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\wei\\AppData\\Local\\Temp\\pycharm-packaging\\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\Public\Documents\Wondershare\CreatorTemp\pip-wheel-gftqkhlz'
       cwd: C:\Users\wei\AppData\Local\Temp\pycharm-packaging\dlib\
  Complete output (43 lines):

后来看到了py3.7的

成功页面

安装dlib包出现各种问题解决(超简单,亲测成功)_第1张图片

导入成功

参考:

https://www.jb51.net/article/166717.htm

你可能感兴趣的:(问题记录,环境搭建等)