美文网首页
Conda 换源和PiP换源

Conda 换源和PiP换源

作者: 姚远_HIT | 来源:发表于2021-04-16 22:46 被阅读0次

前言

每次配置实验室的Linux GPU服务器时,都会遇见Conda换源的问题,遂在此记录之。

Conda更换为清华源

1. 在终端输入一下命令打开condarc文件

vim ~/.condarc

2. 将下面的语句粘贴到上述打开的condarc文件中

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true

Pip换源

1. 源列表

阿里云 https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

2. 临时使用命令:在pip install软件的后面加上-i参数,然后输入源的链接

pip install XXXX -i https://mirrors.aliyun.com/pypi/simple/

3. 永久修改:

3.1 在终端输入以下命令,打开~/.pip/pip.conf :

vim ~/.pip/pip.conf

3.2 修改 ~/.pip/pip.conf, 内容如下:

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

参考文献

[1] 更换pip源到国内镜像

相关文章

  • Conda 换源和PiP换源

    前言 每次配置实验室的Linux GPU服务器时,都会遇见Conda换源的问题,遂在此记录之。 Conda更换为清...

  • [转载] Windows conda pip 改源

    Windows下conda换源pip换源https://blog.csdn.net/weixin_44201449...

  • Mac下conda换源、pip换源

    conda换国内源 在清华源和中科大源之间自行选择 添加中科大源 添加清华源 pip换源 在home目录下的隐藏文...

  • macOS 换源 conda pip

    https://blog.csdn.net/fenghaodaxia/article/details/104520...

  • Anaconda 常用命令大全

    Anaconda 常用命令大全 常用命令 环境管理 Conda 换源 安装32位版本python PIP换源 pi...

  • conda&jupyter&虚拟环境

    环境版本 win10anaconda:4.9.2(自带jupyter)python:3.8 换源 conda换源使...

  • 【环境搭建】将pip、conda、ubuntu源更换为清华源

    换源之后pip、conda、ubuntu下载速度会有大幅提升。 说明:在终端中执行相应的命令即可。 1 更换pip...

  • pip换源

    换源的作用是可以加快python下载库的速度。本篇文章采用的方法是作者已经编辑好换源的文本文件,读者只需要下载后将...

  • 换pip源

    vim ~/.pip/pip.conf [global]index-url = http://mirrors.al...

  • pip换源

    pip3 config set global.index-url https://pypi.tuna.tsingh...

网友评论

      本文标题:Conda 换源和PiP换源

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