pip永久换源

第一步:文件管理器文件路径地址栏输入:%APPDATA%,快速进入 C:\Users\电脑用户\AppData\Roaming文件夹中

第二步:在Roaming文件中新建 pip 文件夹,并在文件夹中新建 pip.ini 配置文件

第三步:在 pip.ini 配置文件中书写以下内容:

[global]
index-url = https://mirrors.aliyun.com/pypi/simple
[install]
use-mirrors =true
mirrors =https://mirrors.aliyun.com/pypi/simple
trusted-host =mirrors.aliyun.com

——以后再任意路径安装模块,都会自动使用阿里云源

posted @ 2024-01-17 14:51  wellplayed  阅读(56)  评论(0编辑  收藏  举报