今天傻逼了,准备安装Tensorflow,碰巧网不好,用pip安装时下载很慢,
关键是经常断。糟心的是pip没有断点续传,一旦断了就前功尽弃。装了好半天,还是
没弄好。后来突然想到pip有没有快点的服务器,一查发现国内镜像很多,
换个地址后,瞬间就下载完毕了。草,太弱智了
---------------
pip国内的一些镜像:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
---------
修改源方法:
临时使用:
可以在使用pip的时候在后面加上-i参数,指定pip源
eg: sudo pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
永久修改:
linux:
修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple