國外的源下載速度實在是太慢了
可以使用國內的一些鏡像網站安裝
使用cmd命令
格式:pip install -i 網站 庫
例如:
國內的一些鏡像網站
清華大學: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/
一勞永逸的解決方法:
在 C:/用戶/你的用戶名 這個路徑下創建一個pip文件夾,然后在其目錄中建立一個pip.ini文件,並輸入以下內容
1 [global]
2 index-url = https://pypi.tuna.tsinghua.edu.cn/simple 3 [install]
4 trusted-host=mirrors.aliyun.com
注意是在pip目錄中,不是你的用戶名中建立pip.ini文件
然后就可以享受下載飛起的pip了~