ubuntu安装Anaconda并更换为清华源 您所在的位置:网站首页 ubuntu怎么更换清华源 ubuntu安装Anaconda并更换为清华源

ubuntu安装Anaconda并更换为清华源

2023-07-18 19:51| 来源: 网络整理| 查看: 265

本教程是基于ubuntu 16.04,18.04也是类似的操作,首先去下载一个anaconda安装包,可以选择去官网或者清华镜像下载,推荐清华镜像下载,国内用户从这下载速度比较快。本教程下载安装Anaconda3-5.3.1-Linux-x86_64.sh这个版本。 待安装包下载安成后,cd到文件所在的目录,执行bash Anaconda3-5.3.1-Linux-x86_64.sh,接下来就是一些简单的接受许可啥的操作。

Welcome to Anaconda3 5.3.1 In order to continue the installation process, please review the license agreement. Please, press ENTER to continue

此处直接回车。

Do you accept the license terms? [yes|no] [no] >>> Please answer 'yes' or 'no':'

此处输入yes,然后回车

Anaconda3 will now be installed into this location: /home/xxx/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/xxx/anaconda3] >>>

这里默认是安装在home目录下,当然home空间不够大的话,可以输入路径安装到别的位置。默认的话就直接回车。 接下来就开始安装过程了,该过程结束后会提示是否添加环境变量,此时输入yes, 回车 最终还会提示是否安装vs code,此处选择no,回车,然后安装就完成了,此时重新打开一个新的终端,执行conda info,就可以看到输入anaconda相关的信息。 anaconda安装完成后需要更换为清华源以提高相关包的下载速度,在终端依次执行这些命令:

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/pkgs/main/ conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/ conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ # 搜索时显示通道地址 conda config --set show_channel_urls yes

最后,执行conda info,可以看到已经成功添加上了,接下来就可以愉快的创建环境了。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有