1、使用win+R打开运行窗口,输入cmd运行
2、在命令行窗口输入pip config --global set global.index-url http://pypi.douban.com/simple/
即可切换为豆瓣镜像源
3、切换镜像源之后还必须添加豆瓣镜像源的信任项,输入pip config --global set install.trusted-host pypi.douban.com
4、使用命令pip config list
即可查看到配置的信息
5、镜像源已经修改成功,使用pip install numpy'
测试一下,能看出来速度还是不错的
**附录**
国内镜像源
清华 https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
删除相应配置文件
pip config --global unset global.index-url
pip config --global unset install.trusted-host