1,安装环境miniconda (python2.7): Miniconda - Conda
配置好环境变量: 优快云
添加一个清华的镜像服务器来加速以后文件的下载:
在cmd中输入命令:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ ,
或者在anaconda prompt中输入:conda config --set show_channel_urls yes
2,安装opencv库文件(opencv3.2) : Opencv3 | Anaconda.org
在anaconda prompt中键入:conda install -c menpo opencv3,遇到proceed(继续?)键入:y
3,安装dlib(最新版本19.9):Dlib | Anaconda.org
键入命令:conda install -c conda-forge/label/cf201901 dlib
然后安装过程中报错:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/label/cf201901/win-64/boost-1.61.0-py27_vc9_1.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
应该是连接超时,在conda安装好之后,默认的镜像是官方的,由于官网的镜像在境外,访问太慢或者不能访问,为了能够加快访问的速度,这里选择了清华的的镜像,键入命令:
C:\Users\zw>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
C:\Users\zw>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
C:\Users\zw>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
C:\Users\zw>conda config --set show_channel_urls yes
键入命令:conda install -c conda-forge/label/cf201901 dlib重新下载dlib;
仍然报错:查询得知
最新的dlib是没有.whl文件的,这就是为什么我们安装会出现错误的原因。