Conda更新或安装包时出现Verifying transaction: failed+RemoveError的解决方法

本文详细记录了解决Anaconda更新错误及在Jupyter中为多个虚拟环境添加Kernel的过程。通过使用conda update --force conda强制更新,解决了RemoveError问题,并介绍了如何在每个虚拟环境中安装ipykernel并添加Kernel。

懒人请直接使用下面代码先更新conda,即可。

conda update --force conda

有兴趣看下面求索过程👇👇👇

为了图方便,想使用conda install nb_conda来让jupyter notebook或jupyter lab自动生成对应所有虚拟环境的Kernal。

conda install nb_conda

不料,懒人没做成,安装失败,最末尾显示:

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: failed

RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.
RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.

意思是无法删除一些库,这个时候其实用下面这个方法可以绕开这个问题:在每个虚拟环境中依次执行:

conda install ipykernel
python -m ipykernel install --name my(在文件夹里的名称) --display-name my(想在jupyter显示名称)

这样就添加了核,在C:\ProgramData\jupyter\kernels(具体看添加核时的说明)路径下其实可以看到你添加的所有核的细节。

但是我没懒成还是不服!继续解决RemoveError的问题,直到找到了

评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

土Bo鼠

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值