126 字
1 分钟
【Python】pip换源

单次换源#

只需要打开终端输入以下命令:

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

其中的 `your-package` 要替换成自己需要安装的库

全局换源#

只需要打开终端输入以下命令:

pip config --site set global.index-url https://mirrors.aliyun.com/pypi/simple/

就会写入 pip 的配置文件中,下载软件速度提高

备注#

几个常用的软件源:

特别备注#

清华源似乎不能使用了,在复制网上教程时须注意

【Python】pip换源
https://xia.shfu.cn/posts/2025-07-30-pythonpip/
作者
MetaIllusion
发布于
2025-07-29
许可协议
CC BY-NC-SA 4.0