下載請求超時
這種情況會發生在所有系統上。如果您出現這種情況,可以有3種方法解決。
方法1.增加超時時間
輸入命令:
pip --default-timeout=100 install xx
方法2.不使用緩存
pip --no-cache-dir install xx
方法3.使用國內鏡像源
pip install xx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
鏡像源可以更改,例如:
阿里雲 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