我這里解決就是更新下載源,馬德,中科的源居然不夠快,我就只能換源了,一換就成功了
1.一次性(臨時使用):
可以在使用pip的時候加參數-i https://pypi.tuna.tsinghua.edu.cn/simple
例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip(其他包名也可以),這樣就會從清華這邊的鏡像去更新庫。
2.永久性
我機器找不到這個目錄,有點騷,我就用的一次性的
linux下,修改 ~/.pip/pip.conf (沒有就創建一個), 修改 index-url至tuna,內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
windows下,直接在user目錄中創建一個pip目錄,如:C:\Users\xx\pip,新建文件pip.ini,內容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple