Conda uses basic operations

Recently, I plan to conduct a systematic study of deep learning. conda+jupyter is a relatively basic environment configuration in deep learning. Conda has the following basic operations

1. Add mirror source

# 添加清华镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# 搜索时显示地址
conda config --set show_channel_urls yes

2. View available channels

conda config --show channels

If the channel contains defaults, it needs to be deleted, so that the Tsinghua mirror source will be used by default when downloading:

conda config --remove channels defaults

3. Reset channel settings

If you want to delete all the added image sources and reset the conda default source, you can use the following statement:

conda config --remove-key channels

4. Create a new environment with the following command:

conda create --name d2l python=3.9 -y

 5. Activate the environment and exit the environment

conda activate d2l
conda deactivate#要退出环境,请运行

6. View the existing virtual environment

conda info --envs

Guess you like

Origin blog.csdn.net/hmysn/article/details/130025958