問題:
今天在遇到了安裝pytorch中的torchvision包的時候一直超時失敗報錯如下
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
之前的安裝的方式是:
pip install --no-deps torchvision
解決辦法:
使用國內的鏡像源安裝。在原來安裝時在命令里加一個參數(shù) -i,然后在i后面加國內鏡像地址。
選擇國內的鏡像源列表如下:
清華源: https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云: 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 install --no-deps torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple/
重新安裝成功了
文章來源:http://www.zghlxwxcb.cn/news/detail-434163.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-434163.html
到了這里,關于ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443)的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!