anaconda 基本使用-(2) 回滚操作,换源操作,nb_conda_kernels

本文介绍了如何使用Anaconda进行回滚操作,通过`conda install --revision`命令恢复到之前的问题出现前的版本。同时,详细阐述了删除和恢复默认源的步骤,以及如何查看和更改conda源,建议将conda-forge设置为最高优先级。此外,还提到了利用`nb_conda_kernels`管理Jupyter内核的方法。
部署运行你感兴趣的模型镜像

anaconda 回滚操作

conda list --revisions

首先,输入conda list -r查询之前的更新版本,然后选择一个之前的版本(出现问题之前),输入
conda install --revision 数字
之后等待回滚成功后。

删除源,恢复默认源

删除了channel list中清华和中科大的源

conda config --remove-key channels

查看conda源

能够显示出所有conda的config信息。

conda config --show
conda config --show-sources

channels的信息

如果我们只想看channels的信息,输入

conda config --show channels

获得源的优先级

conda config --get channels

更换国内conda源

最近一次添加的源将拥有最高优先级

conda config --add channels xxx

conda config --add channels https://repo.anaconda.com/pkgs/main/win-64

最好设置 conda-forge为最高优先级

conda-forge
onda-forge的优势是什么?这个channel有强大的社区支持,提供了大多数安装包,并且更新及时。网址是:

conda config --add channels conda-forge

添加主要的国内源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# 以上两条是Anaconda官方库的镜像

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
# 以上是Anaconda第三方库 Conda Forge的镜像

# for linux
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# for legacy win-64
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/
以上两条是Pytorch的Anaconda第三方镜像

下载的时候显示源地址

conda config --set show_channel_urls yes

查看anaconda配置信息(版本,源)

命令查看anaconda配置信息。

conda info 

nb_conda_kernels

安装了这个就能够监测到内核,不用每个环境都自己创建内核

如果没装该插件

则需要安装ipykernel

conda create -n tf15 python=3.7 ipykernel
python -m ipykernel install  --name kernelname

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

D:\Anaconda\envs\DL\python.exe "D:/桌面/jie shuju/loop_gpr-1.py" D:\桌面\jie shuju\loop_gpr-1.py:3: UserWarning: A NumPy version >=1.22.4 and <2.3.0 is required for this version of SciPy (detected version 1.21.5) from scipy.signal import hilbert Processing files: 0%| | 0/2 [00:00<?, ?it/s]D:\桌面\jie shuju\loop_gpr-1.py:54: RuntimeWarning: overflow encountered in exp exponential_gain = np.exp(b * distance)[:,] # 创建一个列向量以匹配img_data的形状 D:\桌面\jie shuju\loop_gpr-1.py:55: RuntimeWarning: invalid value encountered in multiply img_data_with_gain = img_data * exponential_gain # 将增益应用到原始数据上 Processing files: 100%|██████████| 2/2 [00:19<00:00, 9.93s/it] Processing files: 100%|██████████| 2/2 [00:16<00:00, 8.46s/it] Processing files: 100%|██████████| 2/2 [00:15<00:00, 7.59s/it] Processing files: 100%|██████████| 2/2 [00:16<00:00, 8.06s/it] Processing files: 100%|██████████| 2/2 [00:16<00:00, 8.17s/it] Processing files: 100%|██████████| 2/2 [00:18<00:00, 9.02s/it] Processing files: 100%|██████████| 2/2 [00:17<00:00, 8.71s/it] Processing files: 100%|██████████| 2/2 [00:16<00:00, 8.33s/it] Processing files: 100%|██████████| 2/2 [00:16<00:00, 8.18s/it] Processing files: 0%| | 0/2 [00:00<?, ?it/s]Fail to allocate bitmap Process finished with exit code -2147483645
最新发布
11-29
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值