好用的镜像源
官方源 https://pypi.python.org/simple
阿里云 https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 https://pypi.douban.com/simple
中国科学院 https://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
1.临时使用
我们这里使用的镜像源是清华大学的镜像源,使用方法有两种,第一种是临时使用:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
2.修改默认镜像源
我们将清华的镜像源设置为默认的镜像源:
pip install pip -U # pip进行升级,不升级的掠过
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
先将pip进行升级,然后配置。 到这里就算配置好了,在后面使用pip的时候会发现速度快了。
发表评论