python-激活和切换运行环境

conda info --envs 查看当前所有的环境信息

创建一个名为ame的环境,指定Python版本是ame(不用管是任何版本,conda自动为我们寻找响应版本)
conda create --name ame python=3.6

安装好后,使用activate激活某个环境
activate ame # for Windows
source activate ame # for Linux & Mac

如果想返回默认的python 2.7环境,运行

deactivate python36 # for Windows
source deactivate python36 # for Linux & Mac

删除一个已有的环境
conda remove --name python36 --all

conda config --show channels 查看了我当前 添加了所有镜像通道

conda config --remove channels <此处为通道地址>删除对应的通道地址

换回默认源:
conda config --remove-key channels

添加国内源:
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
conda config --set show_channel_urls yes
原文地址:https://www.cnblogs.com/xinyumuhe/p/13054479.html