在clone别人的代码后发现需要用到dlib
那我肯定直接
pip install dlib
结果发现好像不大行,于是遇事不决问度娘,网上一搜发现,dlib库安装有各种骚操作,安装vs2015什么的呀、其他地方下安装包呀
但是感觉就装一个库而已,应该不需要这么麻烦吧
刚好在无意间找到一篇博文,只需要一行代码就能安装dlib,我这么懒肯定想用这种简便方法试一试呀
conda install -c menpo dlib=18.8
在终端一试(需要之前安装过Anaconda),依然报错,提示如下:
cat@cat:~$ conda install -c menpo dlib=18.8
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- dlib=18.8
Current channels:
- https://conda.anaconda.org/menpo/linux-64
- https://conda.anaconda.org/menpo/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
有提示,直接按照提示走呗!
Anaconda官网 https://anaconda.org 走起!
顶端直接搜索 dlib
直接列出各种相关的库,看描述选择自己需要的包,dlib直接选第一个
下方会直接显示出安装指令
conda install -c conda-forge/label/cf201901 dlib
conda install -c conda-forge dlib
终端输入即可顺利安装,
其他包也可以通过相同的方法来安装,再也不用头疼要安装各种包啦!
ps:最好在这之前将源替换为清华源,不然可能长时间卡住不动甚至连接失败!