首篇博客--记录pip换源和其它

# In case you need to modify your PIP configuration, please be aware that # some configuration files may have a priority order. Here are the following # files that may exists in your machine by order of priority: # # [Priority 1] Site level configuration files # 1. `/home/rzhang/miniconda3/envs/vast/pip.conf` # # [Priority 2] User level configuration files # 1. `/home/rzhang/.config/pip/pip.conf` # 2. `/home/rzhang/.pip/pip.conf` # # [Priority 3] Global level configuration files # 1. `/etc/pip.conf` # 2. `/etc/xdg/pip/pip.conf`

以上就是一般的conda虚拟环境下载源的优先级

因此可以修改~/.config/pip/pip.conf

[global] index-url=https://pypi.douban.com/simple #extra-index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host= pypi.douban.com pypi.tuna.tsinghua.edu.cn timeout = 6000

另外可以修改~/.condarc如下所示,之前install keras的时候可以达到30m/s,但是不知道这种方式修改源下载速度变慢了

channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud auto_activate_base: false

__EOF__

本文作者xle97
本文链接https://www.cnblogs.com/xle97/p/16813931.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   xle97  阅读(21)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· 因为Apifox不支持离线,我果断选择了Apipost!
点击右上角即可分享
微信分享提示