【学习笔记】conda总结

conda常用命令

conda create -n name python=x.x     #创建环境
conda activate name #进入环境
conda deactivate #退出环境
conda env list   #环境信息
conda list    #包信息
conda search 包名  #查看可用版本的包
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes           #添加清华的镜像
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes          #添加中科大的镜像
conda update python   #更新python
conda remove -n name --all    #移除环境

conda设置镜像源

# 优先使用清华conda镜像
conda config --prepend channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

# 也可选用科大conda镜像
conda config --prepend channels http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
#查看镜像源是否设置成功
conda config --set show_channel_urls yes

会生成一个.condarc文件(一般在用户目录下)
一般灰显示为:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
posted @ 2020-12-12 19:10  Curryxin  阅读(128)  评论(0编辑  收藏  举报
Live2D