conda 基本用法

Conda 的使用

基本使用命令
conda update --all                  # 首先更新 conda
conda create -n py375 python=3.7.5  # 创建新环境
conda info -e 或 conda env list      # 查看环境列表
conda activate env_name             # 激活环境
conda deactivate                    # 退出环境
conda info                          # 获取 conda 信息
修改anaconda的安装源
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/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/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
删除默认源信息
vim .condarc				# 可以删除默认的国外源。该目录通常在 /root 目录下
查看源信息
conda config --show-sources 	# 显示.condarc所在位置、源信息
posted @ 2021-06-16 07:37  疯狂列表推导式  阅读(171)  评论(0编辑  收藏  举报