安装dlib,然后各种报错,
什么cmake没装啊,
什么boost没装啊,然后都试了一遍,没解决
最后找到一个最合适的方法。(不用下载杂七杂八的)
1.首先下载文件dlib-19.7.0-cp36-cp36m-win_amd64.whl,在如下的链接中
链接: /s/1pz_mrmRTxppyRT2cTwtVIw 提取码: uc1u
py3.7链接: /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: /simple
Collecting dlib==19.0.0
Downloading /packages/98/04/a42d2b901f2c456f86f3c8ace36e3df64d21d7f368b1cac468489205e850/dlib-19.0. (7.8 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (): started
Building wheel for dlib (): finished with status 'error'
Running clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running install for dlib: started
Running install for dlib: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\wei\.virtualenvs\pyqt51-EL5sW8oD\Scripts\' -u -c 'import sys, setuptools, tokenize; [0] = '"'"'C:\\Users\\wei\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\'"'"'; __file__='"'"'C:\\Users\\wei\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=().replace('"'"'\r\n'"'"', '"'"'\n'"'"');();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的
成功页面
导入成功
参考:
原文链接:/sereasuesue/article/details/105280334