准备做个人脸疲劳检测的程序,准备使用dlib库,折腾了好久才装好,在此记录一下,希望对大家在使用这块开发的朋友有用。
1、我在condo环境下使用conda install dlib是一直提示:
2、我以为是源的问题,所以更新准备更新国内镜像源,按照教程,我在~/.condarc文件中添加了国内源:
- channels:
- - defaults
- show_channel_urls: true
- default_channels:
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
- custom_channels:
- conda - forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
- bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- PackagesNotFoundError: The following packages are not available from current channels:
- - dlib
- Current channels:
- - defaults
- - https://repo.anaconda.com/pkgs/main
- - https://repo.anaconda.com/pkgs/r
- 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.
【解决方法】
- conda install -c https://conda.anaconda.org/conda-forge
- (base) root@myd-lr3576x-debian:~# python
- Python 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:38:53) [GCC 12.3.0] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import dlib
- >>> print(dlib.__version__)
- 19.24.6