새 버전의 pip에 일부 라이브러리를 설치할 때 발생하는 문제

오늘은 내 컴퓨터에 mmseg를 설치하고 pytorch를 설치할 때 입력합니다.

pip install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html

다음 문제가 발생했습니다.

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/torch/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/torch/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/torch/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/torch/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/torch/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /whl/torch_stable.html
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /whl/torch_stable.html
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /whl/torch_stable.html
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /whl/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.5.1+cu101
ERROR: No matching distribution found for torch==1.5.1+cu101

pytorch가 설치 될 때 생성 된 가상 환경이 기본적으로 pip를 설치하기 때문에 많은 방법을주의 깊게 확인한 결과 마지막 문제가 pip 버전이라는 것을 알았습니다 .pip 버전은 최신 20.3 버전이지만 pip 버전은 너무 새롭습니다. 다른 많은 라이브러리를 설치하려면 위의 문제와 같은 문제가 있으므로이 문제가 발생하면 아래 pip 버전을 줄일 수 있으며 20.2로 줄이면 위의 문제가 발생하지 않습니다.

python -m pip install pip==20.2.3 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

몇 장의 사진 게시 :
여기에 사진 설명 삽입
여기에 사진 설명 삽입
여기에 사진 설명 삽입

추천

출처blog.csdn.net/AWhiteDongDong/article/details/111227469