遇到CondaSSLError: OpenSSL appears to be unavailable on this machine,DEBUG:urllib3.connectionpool如何解决

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to download and install packages.

(slim) C:\Users\24205>conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
Collecting package metadata (current_repodata.json): failed

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to download and install packages.

Exception: HTTPSConnectionPool(host='mirrors.shanghaitech.edu.cn', port=443): Max retries exceeded with url: /anaconda/cloud/pytorch/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

解决方法:在官网https://www.anaconda.com/上重新下载anacondahttps://www.anaconda.com/download/

注意:不要下载和原来版本相同的anaconda,换一个全新的anaconda进行下载

DEBUG:urllib3.connectionpool:Starting new HTTPS conne

(base) PS C:\Users\24205> conda create -n shuwa python=3.9
Collecting package metadata (current_repodata.json): | DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
| DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/win-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/msys2/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/msys2/win-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 200 None
| DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/win-64/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 200 None
done
Solving environment: done

## Package Plan ##

  environment location: D:\LenovoSoftstore\anaconda\envs\shuwa

  added / updated specs:
    - python=3.9


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2023.05.30 |       haa95532_0         120 KB
    openssl-3.0.10             |       h2bbff1b_0         7.4 MB
    pip-23.2.1                 |   py39haa95532_0         2.8 MB
    python-3.9.17              |       h1aa4202_0        19.4 MB
    setuptools-68.0.0          |   py39haa95532_0         925 KB
    sqlite-3.41.2              |       h2bbff1b_0         894 KB
    tzdata-2023c               |       h04d1e81_0         116 KB
    vc-14.2                    |       h21ff451_1           8 KB
    vs2015_runtime-14.27.29016 |       h5e58377_2        1007 KB
    wheel-0.38.4               |   py39haa95532_0          83 KB
    ------------------------------------------------------------
                                           Total:        32.7 MB

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2023.05.30-haa95532_0
  openssl            pkgs/main/win-64::openssl-3.0.10-h2bbff1b_0
  pip                pkgs/main/win-64::pip-23.2.1-py39haa95532_0
  python             pkgs/main/win-64::python-3.9.17-h1aa4202_0
  setuptools         pkgs/main/win-64::setuptools-68.0.0-py39haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2023c-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/win-64::wheel-0.38.4-py39haa95532_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
setuptools-68.0.0    | 925 KB    |                                                                              |   0% DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443                            |   0%
sqlite-3.41.2        | 894 KB    |                                                                              |   0%
tzdata-2023c         | 116 KB    |                                                                              |   0%
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443                           |   0%

                                                                                                                       DEBUG:urllib3.connectionpool:Starting new HTTPS conne

解决方法:命令行中输入conda update conda

注意:命令行中运行conda update conda时,还是会出现DEBUG的一堆错误,这个无关紧要,执行这个命令行过后就不会出现这种错误了

  • 6
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
### 回答1: 这个错误表明你的机器上没有安装 OpenSSLConda 需要 OpenSSL 来下载和安装软件包。请尝试在终端中运行 "conda install openssl" 来安装 OpenSSL。如果还是无法解决问题,可能需要寻求其他解决方案,例如使用其他网络连接或者联系系统管理员。 ### 回答2: CondaSSLError错误是因为在计算机上未找到OpenSSL。要解决此问题,需要安装OpenSSL软件。 以下是解决步骤: 1. 首先,打开终端或命令提示符窗口。 2. 在终端或命令提示符中,输入以下命令(取决于您使用的操作系统)以安装OpenSSL: - 在Debian/Ubuntu上:sudo apt-get install openssl - 在Fedora/CentOS上:sudo yum install openssl - 在Windows上:从OpenSSL官方网站(https://www.openssl.org/source/)下载适用于您的操作系统的安装程序,并按照安装指南进行安装。 3. 安装完成后,重新启动计算机以使更改生效。 4. 在重启后,再次尝试使用Conda下载和安装包,应该不再出现“CondaSSLError: OpenSSL appears to be unavailable on this machine”的错误。 请注意,以上步骤是针对缺少OpenSSL的情况。如果您已经安装了OpenSSL但仍然遇到该错误,请确保OpenSSL已正确配置和更新,并尝试升级Conda或使用其他版本的Conda。如果问题仍然存在,请向Conda社区求助以获取更多帮助。 ### 回答3: CondaSSLError错误表示在计算机上无法使用OpenSSLOpenSSL是用于下载和安装包所必需的。 OpenSSL是一个开源的加密库,它提供了一套用于处理网络传输中加密和解密的函数。在使用Conda进行包的下载和安装时,由于安全性要求,Conda需要使用OpenSSL来确保数据的安全传输。因此,如果计算机上没有安装或配置OpenSSL,就会出现CondaSSLError错误。 要解决这个问题,首先需要确认计算机上是否已经正确安装了OpenSSL。可以通过在命令行窗口中输入"openssl version"命令来检查。如果命令能够正常执行并且显示当前安装的OpenSSL版本号,那么说明OpenSSL已经正确安装。 如果没有安装OpenSSL,可以通过以下步骤来安装它: 1. 打开终端或命令行窗口。 2. 如果是Windows系统,可以从OpenSSL官方网站(https://www.openssl.org/)下载最新的Windows版本,并按照安装向导进行安装。 如果是Linux系统,可以使用相应的包管理器(如apt、yum等)来安装OpenSSL。例如,在Ubuntu系统中可以使用以下命令进行安装: $ sudo apt-get install openssl 在CentOS系统中可以使用以下命令进行安装: $ sudo yum install openssl 3. 完成安装后,再次运行"openssl version"命令来确认OpenSSL已经成功安装。 如果已经安装了OpenSSL但仍然出现CondaSSLError错误,可能是因为Conda没有正确配置OpenSSL的路径。在这种情况下,可以通过在命令行窗口中运行以下命令来配置OpenSSL路径: $ export OPENSSL_ROOT_DIR=<OpenSSL的安装路径> 替换"<OpenSSL的安装路径>"为实际的OpenSSL安装路径,然后尝试再次使用Conda下载和安装包,希望能够成功解决CondaSSLError错误。
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值