python报错:WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))

在下载python包时,遇到以下报错

[root@computer-48 ~]# pip3 install coloredlogs
Looking in indexes: http://172.16.50.80:8080/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,)’: /simple/coloredlogs/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,)’: /simple/coloredlogs/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,)’: /simple/coloredlogs/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,)’: /simple/coloredlogs/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,)’: /simple/coloredlogs/
ERROR: Could not find a version that satisfies the requirement coloredlogs (from versions: none)
ERROR: No matching distribution found for coloredlogs

关于错误原因

目前还没有找到,这里先记录下解决方法

解决方法

pip install packageName  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
# packageName写要安装的包名即可

参考:https://blog.csdn.net/qq_42466324/article/details/104594472

你可能感兴趣的:(运维,python)