安装scikit-learn问题

1.问题描述如下:
---------------------------------------------------------------------------------------------------------------------------------

(pytorch) [root@cento ~]# conda install scikit-learn

Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/repodata.json>
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.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/cloud/conda-forge/linux-64/repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])")))'))
---------------------------------------------------------------------------------------------------------------------------------

2.解决方法:
=========================================================================

2.1 删除清华源,恢复默认源:
(pytorch) [root@cento ~]# conda config --remove-key channels


2.2 使用conda安装sklearn
(pytorch) [root@cento ~]# conda install scikit-learn
Solving environment: | 
Warning: 4 possible package resolutions (only showing differing packages):
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main::certifi-2021.5.30-py37h06a4308_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main::openssl-1.1.1l-h7f8727e_0
  - defaults::certifi-2021.5.30-py37h06a4308_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main::openssl-1.1.1l-h7f8727e_0
  - defaults::openssl-1.1.1l-h7f8727e_0, https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main::certifi-2021.5.30-py37h06a4308_0
  - defaults::certifi-2021.5.30-py37h06a4308_0, defaults::openssl-1.1.1l-h7f8727edone


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.11
  latest version: 4.10.3

Please update conda by running

    $ conda update -n base -c defaults conda

## Package Plan ##

  environment location: /usr/anaconda3/envs/pytorch

  added / updated specs: 
    - scikit-learn


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    scikit-learn-0.24.2        |   py37ha9443f7_0         7.1 MB  defaults
    ca-certificates-2021.9.30  |       h06a4308_1         123 KB  defaults
    libgfortran-ng-7.3.0       |       hdf63c60_0         1.3 MB  defaults
    joblib-1.0.1               |     pyhd3eb1b0_0         207 KB  defaults
    scipy-1.6.2                |   py37h91f5cce_0        19.9 MB  defaults
    threadpoolctl-2.2.0        |     pyh0d69192_0          16 KB  defaults
    ------------------------------------------------------------
                                           Total:        28.6 MB

The following NEW packages will be INSTALLED:

    joblib:          1.0.1-pyhd3eb1b0_0    defaults                                               
    libgfortran-ng:  7.3.0-hdf63c60_0      defaults                                               
    scikit-learn:    0.24.2-py37ha9443f7_0 defaults                                               
    scipy:           1.6.2-py37h91f5cce_0  defaults                                               
    threadpoolctl:   2.2.0-pyh0d69192_0    defaults                                               

The following packages will be UPDATED:

    ca-certificates: 2021.7.5-h06a4308_1   https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main --> 2021.9.30-h06a4308_1 defaults

Proceed ([y]/n)? y


Downloading and Extracting Packages
scikit-learn-0.24.2  | 7.1 MB    | ############################## | 100% 
ca-certificates-2021 | 123 KB    | ########################## | 100% 
libgfortran-ng-7.3.0 | 1.3 MB    | ################################## | 100% 
joblib-1.0.1         | 207 KB    | ######################################### | 100% 
scipy-1.6.2          | 19.9 MB   |################################### | 100% 
threadpoolctl-2.2.0  | 16 KB     | ###################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: / 

    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py

    

done
=======================================

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值