如果你發現pip install xxx之後下載的進度條前進的比烏龜還要慢,那就馬上按下ctr+c終止掉這個命令吧!一般來說,pip install下載太慢是因爲你用的源不太好,比如ubuntu默認的源就特別慢。這時候只需要在下載的時候選擇一下源就能輕鬆解決這個問題了,比如下面的:
# 格式:pip install -i 源路徑 安裝的包名稱
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
有哪些好用的源呢:
清華:https://pypi.tuna.tsinghua.edu.cn/simple
阿里雲:http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/