BUG解决:虚拟环境出现CondaSSLError,但base环境正常...

BUG解决:虚拟环境出现CondaSSL Error,但base环境正常...

1. SSL BUG 报错信息

BUG解决:虚拟环境出现CondaSSLError,但base环境正常…

错误信息如下:

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='conda.anaconda.org', port=443): Max retries exceeded with url: /pytorch/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

2. BUG解决

首先参考了资料【1】,删掉了国内的镜像源,但是没有效果。。

确定问题原因: 发现在虚拟环境下ssl报错的情况下,deactiavte 推出后,base环境下仍然可以下载包,测试装了下matplotlib,证明就是虚拟环境设置的错误了…

conda install matplotlib
Collecting package metadata (current_repodata.json): done
Solving environment: -
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
...

那么问题就集中在: (1)到底有没有安装openssl?(2)装好了openssl的话是不是没配置好?
base环境下测试下:

conda install openssl

显示信息如下,

Collecting package metadata (current_repodata.json): done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==2022.05=py39_0
  - defaults/win-64::anaconda-client==1.9.0=py39haa95532_0
  - defaults/win-64::anaconda-navigator==2.1.4=py39haa95532_0
  - defaults/noarch::anaconda-project==0.10.2=pyhd3eb1b0_0
  - defaults/win-64::bokeh==2.4.2=py39haa95532_0
  - defaults/noarch::conda-repo-cli==1.0.4=pyhd3eb1b0_0
  - defaults/noarch::dask==2022.2.1=pyhd3eb1b0_0
  - defaults/noarch::datashader==0.13.0=pyhd3eb1b0_1
  - defaults/noarch::holoviews==1.14.8=pyhd3eb1b0_0
  - defaults/noarch::hvplot==0.7.3=pyhd3eb1b0_1
  - defaults/noarch::imageio==2.9.0=pyhd3eb1b0_0
  - defaults/noarch::intake==0.6.5=pyhd3eb1b0_0
  - defaults/noarch::ipywidgets==7.6.5=pyhd3eb1b0_1
  - defaults/win-64::jupyter==1.0.0=py39haa95532_7
  - defaults/noarch::jupyterlab==3.3.2=pyhd3eb1b0_0
  - defaults/noarch::jupyterlab_server==2.10.3=pyhd3eb1b0_1
  - defaults/noarch::jupyter_server==1.13.5=pyhd3eb1b0_0
  - defaults/win-64::matplotlib==3.5.1=py39haa95532_1
  - defaults/win-64::matplotlib-base==3.5.1=py39hd77b12b_1
  - defaults/noarch::nbclassic==0.3.5=pyhd3eb1b0_0
  - defaults/win-64::nbclient==0.5.13=py39haa95532_0
  - defaults/win-64::nbconvert==6.4.4=py39haa95532_0
  - defaults/win-64::notebook==6.4.8=py39haa95532_0
  - defaults/win-64::panel==0.13.0=py39haa95532_0
  - defaults/win-64::scikit-image==0.19.2=py39hf11a4ad_0
  - defaults/noarch::seaborn==0.11.2=pyhd3eb1b0_0
  - defaults/win-64::spyder==5.1.5=py39haa95532_1
  - defaults/win-64::widgetsnbextension==3.5.2=py39haa95532_0
  - defaults/win-64::_ipyw_jlab_nb_ext_conf==0.1.0=py39haa95532_0
failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: -
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==2022.05=py39_0
  - defaults/win-64::anaconda-client==1.9.0=py39haa95532_0
  - defaults/win-64::anaconda-navigator==2.1.4=py39haa95532_0
  - defaults/noarch::anaconda-project==0.10.2=pyhd3eb1b0_0
  - defaults/win-64::bokeh==2.4.2=py39haa95532_0
  - defaults/win-64::conda-build==3.21.8=py39haa95532_2
  - defaults/noarch::conda-repo-cli==1.0.4=pyhd3eb1b0_0
  - defaults/noarch::dask==2022.2.1=pyhd3eb1b0_0
  - defaults/noarch::datashader==0.13.0=pyhd3eb1b0_1
  - defaults/noarch::holoviews==1.14.8=pyhd3eb1b0_0
  - defaults/noarch::hvplot==0.7.3=pyhd3eb1b0_1
  - defaults/noarch::imageio==2.9.0=pyhd3eb1b0_0
  - defaults/noarch::intake==0.6.5=pyhd3eb1b0_0
  - defaults/noarch::ipywidgets==7.6.5=pyhd3eb1b0_1
  - defaults/win-64::jupyter==1.0.0=py39haa95532_7
  - defaults/noarch::jupyterlab==3.3.2=pyhd3eb1b0_0
  - defaults/noarch::jupyterlab_server==2.10.3=pyhd3eb1b0_1
  - defaults/noarch::jupyter_server==1.13.5=pyhd3eb1b0_0
  - defaults/win-64::matplotlib==3.5.1=py39haa95532_1
  - defaults/win-64::matplotlib-base==3.5.1=py39hd77b12b_1
  - defaults/noarch::nbclassic==0.3.5=pyhd3eb1b0_0
  - defaults/win-64::nbclient==0.5.13=py39haa95532_0
  - defaults/win-64::nbconvert==6.4.4=py39haa95532_0
  - defaults/win-64::notebook==6.4.8=py39haa95532_0
  - defaults/win-64::panel==0.13.0=py39haa95532_0
  - defaults/win-64::scikit-image==0.19.2=py39hf11a4ad_0
  - defaults/noarch::seaborn==0.11.2=pyhd3eb1b0_0
  - defaults/win-64::spyder==5.1.5=py39haa95532_1
  - defaults/win-64::widgetsnbextension==3.5.2=py39haa95532_0
  - defaults/win-64::_ipyw_jlab_nb_ext_conf==0.1.0=py39haa95532_0
done

## Package Plan ##

  environment location: C:\Users\86139\anaconda3

  added / updated specs:
    - openssl


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _anaconda_depends-2022.10  |           py39_2          68 KB  defaults
    anaconda-custom            |           py39_3          43 KB  defaults
    anaconda-anon-usage-0.4.4  |   py39h8ddfbff_0          27 KB  defaults
    anaconda-navigator-2.4.3   |   py39haa95532_0         5.5 MB  defaults
    boltons-23.0.0             |   py39haa95532_0         421 KB  defaults
    certifi-2024.8.30          |   py39haa95532_0         163 KB  defaults
    conda-23.3.1               |   py39haa95532_0         972 KB  defaults
    conda-build-3.27.0         |   py39haa95532_0         596 KB  defaults
    conda-index-0.5.0          |   py39haa95532_0         216 KB  defaults
    conda-package-streaming-0.11.0|   py39haa95532_0          30 KB  defaults
    jsonpatch-1.33             |   py39haa95532_1          57 KB  defaults
    jsonpointer-2.1            |     pyhd3eb1b0_0           9 KB  defaults
    m2-msys2-runtime-2.5.0.17080.65c939c|                3         3.0 MB  defaults
    m2-patch-2.7.5             |                2          89 KB  defaults
    more-itertools-10.3.0      |   py39haa95532_0         124 KB  defaults
    nbformat-5.9.2             |   py39haa95532_0         155 KB  defaults
    ruamel.yaml-0.17.21        |   py39h2bbff1b_0         174 KB  defaults
    ruamel.yaml.clib-0.2.6     |   py39h2bbff1b_1         101 KB  defaults
    zstandard-0.19.0           |   py39h2bbff1b_0         340 KB  defaults
    ------------------------------------------------------------
                                           Total:        12.0 MB

The following NEW packages will be INSTALLED:

  _anaconda_depends  pkgs/main/win-64::_anaconda_depends-2022.10-py39_2 None
  anaconda-anon-usa~ pkgs/main/win-64::anaconda-anon-usage-0.4.4-py39h8ddfbff_0 None
  boltons            pkgs/main/win-64::boltons-23.0.0-py39haa95532_0 None
  conda-index        pkgs/main/win-64::conda-index-0.5.0-py39haa95532_0 None
  conda-package-str~ pkgs/main/win-64::conda-package-streaming-0.11.0-py39haa95532_0 None
  jsonpatch          pkgs/main/win-64::jsonpatch-1.33-py39haa95532_1 None
  jsonpointer        pkgs/main/noarch::jsonpointer-2.1-pyhd3eb1b0_0 None
  m2-msys2-runtime   pkgs/msys2/win-64::m2-msys2-runtime-2.5.0.17080.65c939c-3 None
  m2-patch           pkgs/msys2/win-64::m2-patch-2.7.5-2 None
  more-itertools     pkgs/main/win-64::more-itertools-10.3.0-py39haa95532_0 None
  nbformat           pkgs/main/win-64::nbformat-5.9.2-py39haa95532_0 None
  pillow             pkgs/main/win-64::pillow-9.3.0-py39hdc2b20a_1 None
  ruamel.yaml        pkgs/main/win-64::ruamel.yaml-0.17.21-py39h2bbff1b_0 None
  ruamel.yaml.clib   pkgs/main/win-64::ruamel.yaml.clib-0.2.6-py39h2bbff1b_1 None
  zstandard          pkgs/main/win-64::zstandard-0.19.0-py39h2bbff1b_0 None

The following packages will be UPDATED:

  anaconda-navigator                   2.1.4-py39haa95532_0 --> 2.4.3-py39haa95532_0 None
  ca-certificates                      2022.3.29-haa95532_1 --> 2024.9.24-haa95532_0 None
  certifi                          2021.10.8-py39haa95532_2 --> 2024.8.30-py39haa95532_0 None
  conda                               22.9.0-py39haa95532_0 --> 23.3.1-py39haa95532_0 None
  conda-build                         3.21.8-py39haa95532_2 --> 3.27.0-py39haa95532_0 None
  openssl                                 1.1.1n-h2bbff1b_0 --> 1.1.1w-h2bbff1b_0 None

The following packages will be DOWNGRADED:

  anaconda                                   2022.05-py39_0 --> custom-py39_3 None


Proceed ([y]/n)? y

感觉也可能是conda 在考虑了现在虚拟环境配置的基础上,调整了openssl和对应的安装包的配置!!

PS: 另外,就是需要看看conda是不是最新的,先更新…

conda update -n base -c defaults conda

只不过BUG也是层出不穷…见资料【2】,360是看不爽Anaconda还是说anaconda安装包的过程存在一些风险操作。。。好像matlab也被360报警… 只不过anaconda这种后台大批量下载奇怪文件的操作是有点奇怪,被360盘问也无可厚非

参考资料

【1】优快云-conda 创建虚拟环境出现CondaSSLError
【2】360报警Anaconda

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Robo-网络矿产提炼工

你的鼓励将是我最大的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值