linux
用户主目录下创建.pip/pip.conf文件
[global]
#index-url=http://mirrors.aliyun.com/pypi/simple/
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
#trusted-host=mirrors.aliyun.com
trusted-host=pypi.tuna.tsinghua.edu.cn
这篇博客介绍了如何在Linux环境下为Python的pip设置全局配置,通过编辑用户主目录下的.pip/pip.conf文件,将默认的PyPI源替换为阿里云或清华大学的镜像源,以加速软件包的下载和安装过程。设置'index-url'和'trusted-host'参数确保了安全和高效的包管理。
linux
用户主目录下创建.pip/pip.conf文件
[global]
#index-url=http://mirrors.aliyun.com/pypi/simple/
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
#trusted-host=mirrors.aliyun.com
trusted-host=pypi.tuna.tsinghua.edu.cn
13万+
2万+

被折叠的 条评论
为什么被折叠?