以下配置的是清华源,可自行更改源地址!

python配置永久镜像源

1.打开cmd窗口或进入命令行模式
2.依次输入以下指令

1
2
3
4
5
6
7
8
cd %APPDATA%
rmdir /s/q pip
md pip
cd pip
(echo [global]
echo timeout = 6000
echo index-url = https://pypi.tuna.tsinghua.edu.cn/simple
echo trusted-host = pypi.tuna.tsinghua.edu.cn)>pip.ini

3.关闭cmd窗口或命令行模式,重新启动pycharm或代码编译工具就可以高速下载python第三方库啦