pyCharm中下载包的速度慢的解决方案
1、解决方案使用阿里镜像2、具体步骤1、在项目里面新建一个xxx.py文件2、然后将下面的代码复制进xxx.py文件import osini = "[global]\nindex-url = https://mirrors.aliyun.com/pypi/simple/\n"pippath=os.environ["USERPROFILE"]+"\\pip\\"exec("if not os.pat
·
1、解决方案
- 使用阿里镜像
2、具体步骤
- 1、在项目里面新建一个xxx.py文件
- 2、然后将下面的代码复制进xxx.py文件
import os
ini = "[global]\nindex-url = https://mirrors.aliyun.com/pypi/simple/\n"
pippath=os.environ["USERPROFILE"]+"\\pip\\"
exec("if not os.path.exists(pippath):\n\tos.mkdir(pippath)")
open(pippath+"/pip.ini","w+").write(ini)
- 3、运行这段程序
- 4、然后去下载包,速度变快
更多推荐
已为社区贡献3条内容
所有评论(0)