pip-script.py‘ is not present Verifying transaction: failed

目录

pip-script.py' is not present

Verifying transaction: failed


两个错:

pip install numpy报错:

pip-script.py' is not present

解决方法:

conda install pip,但是这个又报错:

Verifying transaction: failed

成功的解决方法:

conda update --force conda
有兴趣看下面求索过程

Conda更新或安装包时出现Verifying transaction: failed+RemoveError的解决方法_土Bo鼠的博客-CSDN博客

为了图方便,想使用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的问题,直到找到了Github讨论,里面讨论得非常激烈,主要问题就是需要进行conda的更新:

conda update conda
但是在base里还是会出错,仍显示RemoveError,再看到说要退出所有虚拟环境再更新,使用下面命令:

conda deactivate
conda update conda
还是不成,问题依旧。最后!看到这个救星:

使用:(注意!一定要回到base环境执行,不然....就看这篇博客解决吧:anaconda装环境遇到无法定位程序输入点OPENSSL_sk_new_reserve……问题)

conda update --force conda
成功更新conda!至此,再进入base环境做你想做的事吧!

对于conda install nb_conda我还有想说的,因为执行后还是有问题,还是没有懒对!

执行后jupyter lab并没有自动识别出所有虚拟环境,jupyter notebook也有问题,真是让人揪心!最后显示了些这个:

这和另一篇博客对应上了,他给出了解决方案:jupyter-lab识别anaconda虚拟环境

# 先
conda install nb_conda ipykernel
# 激活某个环境后运行下面命令
python -m ipykernel install --name my(在文件夹里的名称) --display-name my(想在jupyter显示名称)
是不是很眼熟。。。最后就是省了在每个环境install ipykernal的步骤(但是我还是需要一个一个安装kernal好像,可能他是在全局conda install的)。啊,还是老老实实一个一个弄吧。👇👇👇

在每个虚拟环境中依次执行:

conda install ipykernel
python -m ipykernel install --name my(在文件夹里的名称) --display-name my(想在jupyter显示名称)
检验是否添加成功,可通过下面命令查看:

jupyter kernelspec list
————————————————
版权声明:本文为CSDN博主「土Bo鼠」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_38634125/article/details/106483214

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

AI算法网奇

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

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

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

打赏作者

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

抵扣说明:

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

余额充值