文章目录
1.添加国内镜像2.添加pip.ini
1.添加国内镜像
打开settings->Python Interpreter 点击+,选择Manage Respositories 点击+,添加国内镜像 常用国内镜像
https://pypi.tuna.tsinghua.edu.cn/simple/
http://mirrors.aliyun.com/pypi/simple/
https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
http://pypi.doubanio.com/simple/
2.添加pip.ini
找到Pycharm安装目录,我的是D:\PyCharm 2020.3.5\plugins\python\helpers,新建一个pip.ini文件(新建文本文档改后缀就行,找不到helpers可以在安装目录搜索一下),文件内容为
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = https://pypi.tuna.tsinghua.edu.cn
亲测有效
|