WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001C3B22F8F70>, ‘Connection to pypi.org timed out. (connect timeout=15)’)’: /simple/torch/
问题原因:
说是默认的pip源的问题,这里可以使用国内的镜像
国内的一些pip源:
阿里云 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/
使用方法:在后面直接 -i 加 url
然后出现如下警告:
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with ‘–trusted-host mirrors.aliyun.com’.
emmm,试了一系列方法后,最后还是直接找的官网
把cuda选项选择none
原因应该是cuda过大?用官方链接下不下来?
总之勾选了这个然后输入官方给的语句:
pip install torch1.7.0+cpu torchvision0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
就好了