美文网首页
安装conda环境

安装conda环境

作者: 倦意羽毛 | 来源:发表于2019-10-25 09:23 被阅读0次
# 安装conda环境
# 参考https://www.jianshu.com/p/edaa744ea47d
# 下载安装脚本
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod 777 Miniconda3-latest-Linux-x86_64.sh #给执行权限
bash Miniconda3-latest-Linux-x86_64.sh #运行
# 注意默认装在root下,建议换到home,一般机器的root空间会比较小

# 基本操作
source /home/miniconda3/bin/activate base
conda list
# 安装软件可以从https://anaconda.org/搜索
# conda环境功能非常强大,除python相关的软件,还可以安装gcc等
conda install -c conda-forge requests

# conda环境变量设置在.bashrc中,conda initialize处
# 注释调这些行,就不会自动进conda环境

# conda环境的便利性在于,将miniconda文件夹移动到其他机子(保持相同的路径)
# conda环境直接就可用,非常方便
# 比如将gcc等编译工具及python相关的软件安装到conda
# 这个conda打包拷贝到其他全新的环境使用,保持所有环境的软件是一致的
# 甚至可以只打包miniconda/envs/下的文件夹到其他环境,也可以直接用

#创建不同版本的python环境
conda create -n env_name python=2.7

# clone环境,delete环境
conda create -n my-env --clone env-name
conda remove -n my-env --all
conda install -c conda-forge tensorflow=1.14
pip install torch

相关文章

网友评论

      本文标题:安装conda环境

      本文链接:https://www.haomeiwen.com/subject/zwojvctx.html