首页 > 解决方案 > 无法在 anaconda 中安装 dlib

问题描述

我正在尝试安装dlib在 Anaconda 中以便在 jupyter-notebook 中使用它。

我尝试使用conda install -c menpo dlib,然后 dlib 没有安装,而是说:

Downloading and Extracting Packages
py-boost-1.67.0      | 318 KB    | ################################################################# | 100% 
widgetsnbextension-1 | 1.1 MB    |                                                                   |   0% 
ipywidgets-5.1.5     | 61 KB     |                                                                   |   0% 
boost-1.59.0         | 11.9 MB   |                                                                   |   0% 
dlib-19.9            | 2.3 MB    |                                                                   |   0% 

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/widgetsnbextension-1.2.3-py35_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.

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/ipywidgets-5.1.5-py35_0.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.

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/boost-1.59.0-py35_0.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.

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/dlib-19.9-py35_0.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.

然后,我dlib-19.16.0.tar.gz这里下载并保存它 /anaconda3/lib/python3.6/site-packages然后运行conda install -c conda-forge dlib-19.16.0.tar.gz,但它显示:

PackagesNotFoundError: The following packages are not available from current channels:

  - dlib-19.16.0.tar.gz

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/osx-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/pro/osx-64
  - https://repo.anaconda.com/pkgs/pro/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.

标签: python-3.xmacosanacondadlib

解决方案


第一个错误只是说您无法连接到 menpo 库存储库。我建议检查您的代理/互联网连接。

在第二种情况下,您尝试安装 tar.gz 文件,这是一个压缩文件。先解压(解压),然后尝试安装。


推荐阅读