.condarc源文件存储位置以及Ubuntu换源 您所在的位置:网站首页 source文件夹在哪里 .condarc源文件存储位置以及Ubuntu换源

.condarc源文件存储位置以及Ubuntu换源

2024-07-09 16:01| 来源: 网络整理| 查看: 265

Content Anaconda中的.condarc源文件一、该文件的一般存储路径Windows存储路径linux存储路径 二、Windows源文件默认内容三、Ubuntu换源conda源Ubuntu源(适用于21.04和18.04)清华源(速度快于阿里源)阿里源

Anaconda中的.condarc源文件 一、该文件的一般存储路径 Windows存储路径

C:\Users\username\.condarc

其中’username’为自己电脑的用户名

linux存储路径

~/.condarc

可使用vi命令或者gedit命令修改文件 如果没有该文件,需要先使用下面命令生成默认配置文件

conda config --set show_channel_urls yes

二、Windows源文件默认内容 channels: - defaults ssl_verify: true show_channel_urls: true 三、Ubuntu换源 conda源 channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ - defaults show_channel_urls: true Ubuntu源(适用于21.04和18.04)

Step1: 查看ubuntu的安装版本

lsb_release -a

Step2: 编辑配置文件:

gedit /etc/apt/sources.list

Step3: 使用下面内容替换该文件内容

清华源(速度快于阿里源) # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

注意:如果出现下面问题,需要将网址中的’https’变为’http’ 在这里插入图片描述 如果出现下面问题

GPG Error: ... The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 公钥

需要使用下面命令添加公钥

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 上面显示的公钥

阿里源 eb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse # deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Step4: 更新源

sudo apt-get update



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

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