pip安装笔记(anaconda)

本文详细介绍了如何更换Python的pip源和Anaconda的镜像源,以提高下载速度和稳定性。包括了清华大学、阿里云等国内常用镜像源的配置方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、更换python源

  

mkdir ~/.pip
cd ~/.pip
vi pip.conf

  vi编辑内容如下:

[global] 
index-url=https://pypi.tuna.tsinghua.edu.cn/simple 
[install] 
trusted-host=pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 6000 --------------------- 作者:ke1th 来源:优快云 原文:https://blog.youkuaiyun.com/u012436149/article/details/66974668 版权声明:本文为博主原创文章,转载请附上博文链接!
上述内容中这一段是可选操作
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 6000

 

  下面是python常用的国内镜像

新版ubuntu要求使用https源,要注意。
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中科技大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
--------------------- 
作者:木盏 
来源:优快云 
原文:https://blog.youkuaiyun.com/leviopku/article/details/80113021 
版权声明:本文为博主原创文章,转载请附上博文链接!

 

2、更换anaconda源

  terminal中输入下面语句,添加清华的镜像源到anaconda配置文件中

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
conda config --set show_channel_urls yes

  删除anaconda中的镜像源配置

conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

  查看anaconda的镜像配置

conda config --show

  上述参考:https://blog.youkuaiyun.com/u012436149/article/details/66974668

        参考2,点

 

 

转载于:https://www.cnblogs.com/smartmsl/p/10445445.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值