pip install torchsummary报错
报错如下:
Looking in indexes: https://pipy.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000184292DCBD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/torchsummary/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000184292D9310>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/torchsummary/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000184292F7490>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/torchsummary/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000184293102D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/torchsummary/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000184292F1D50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/torchsummary/
ERROR: Could not find a version that satisfies the requirement torchsummary (from versions: none)
ERROR: No matching distribution found for torchsummary
图
解决方法:
pip install torchsummary -i https://pypi.mirrors.ustc.edu.cn/simple/
pip install 包名 -i url
url替换如下:
阿里云 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/
特别感谢:
Python学习:解决pip总是WARNING: Retrying (Retry(total=4..._retrying retry total=4-CSDN博客