一.前言
修改镜像可以让我们下载模块的速度增加
因为模块都是从国内的镜像上面获取
使用python版本 3.8.0、windows 10
国内比较出名的开源镜像站
豆瓣:http://pypi.douban.com/simple/
中科大:https://pypi.mirrors.ustc.edu.cn/simple/
清华:https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
二、步骤
1.永久更改
在命令提示符中运行
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
将pip 的下载源 永久切换到阿里云开源镜像站
2.一次性使用
可以在使用pip的时候加参数-i http://pypi.douban.com/simple/
pip install pandas -i http://pypi.douban.com/simple/
就会从豆瓣开源镜像站去下载最新版本的pandas库