Skip to content

配置pycharm pip 国内镜像源

win 系统

镜像地址:

① 阿里镜像:

https://mirrors.aliyun.com/pypi/simple/

② 百度镜像:

https://mirror.baidu.com/pypi/simple/

③ 清华镜像:

https://pypi.tuna.tsinghua.edu.cn/simple/

④ 中科大镜像:

https://pypi.mirrors.ustc.edu.cn/simple/

⑤ 豆瓣镜像:

http://pypi.douban.com/simple/

⑥ 搜狐镜像:

http://mirrors.sohu.com/Python/

⑦ 华中科大镜像:

https://pypi.hustunique.com/

⑧ 山东理工大学镜像:

https://pypi.hustunique.com/

配置国内镜像源地址

找到 c 盘的用户目录:C:\Users\ASUS 创建文件夹pip 里面创建文件:pip.ini

### pip.ini
[global]
index-url =https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn/simple/

验证

打开 pycharm 终端:pip install 某个第三方库,确认是否使用指定的地址进行下载

命令

win 系统快速查找文件地址的方法:win+r-> 输入%APPDATA%就能快速找到 appdata 的文件目录,该方法通过通配符来快速找寻一些特定名称的文件目录

mac 或 linux 系统

使用.pip文件夹,后续操作一致

原文链接:https://ceshiren.com/t/topic/31994