pip install -i https://pypi.tuna.tsinghua.edu.cn/simple <package-name>
把 <package name>
换成你想要安装的第三方库的库名,这个是清华源的地址,就可以享受高速稳定的下载网络啦!
所以比如我说要安装tensorflow 2.x呢,就
pip install tensorflow-cpu==2.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
好了。
清华源有时候会崩,这时候可以试试阿里源:
http://mirrors.aliyun.com/pypi/simple/
把的网站换成阿里源的地址就行了。
腾讯源:https://mirrors.cloud.tencent.com/pypi/simple
那么问题来了,如何让conda install
也变得很快呢?
清华的conda镜像地址给出了使用清华conda源的方法:
Tsinghua Open Source Mirrormirror.tuna.tsinghua.edu.cn![66058664624b96873087d9c0178fd70c.png](https://i-blog.csdnimg.cn/blog_migrate/bd304db6c6d5faaf8a5783a412665b30.jpeg)
把里面的一段内容粘贴到用户目录下的.condarc
文件就可以啦!