AI环境搭建系列1 Anaconda常用命令
AI初学者,anaconda的这几句环境配置命令绝对够用了!
创建环境
conda create -n python27_tensorflow1.8
环境切换
激活环境
source activate python27_tensorflow1.8
退出环境
source deactivate python27_tensorflow1.8
移除环境
conda remove -n python27_tensorflow1.8 --all
如果你的anaconda的安装目录是: ~/anaconda2, 则可以到目录 ~/anaconda2/envs/ 查看相关环境的文件夹,上面创建和删除的过程会在这个目录有所体现。
查看某环境下安装的package
conda list -n python27_tensorflow1.8
查找包
这个命令会到服务器上去查找对应的包的所有版本并列出
conda search numpy
Anaconda 仓库的镜像
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
推荐下清华的加速conda环境配置的镜像网站
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
参考文献:
1 https://zhuanlan.zhihu.com/p/22678445
2 https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/