无法在Anaconda中安装dlib

时间:2018-10-02 06:22:22

标签: python-3.x macos anaconda dlib

我正在尝试在Anaconda中安装dlib,以便在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.

然后,我从here下载了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.

1 个答案:

答案 0 :(得分:0)

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

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