当通过pip安装任何东西时,我收到此错误,无法建立新连接: WinError 10061无法建立连接,因为目标计算机主动拒绝连接。我是通过pip命令安装django的,也就是pip install django,我得到了这个错误:
Retrying (Retry(total=4, connect=None, read=None, redirect=None,
status=None)) after connection broken by 'ProxyError('Cannot connect to
proxy.',
NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x04135910>: Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine actively refused
it',))': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None,
status=None)) after connection broken by 'ProxyError('Cannot connect to
proxy.',
NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x04135850>: Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine actively refused
it',))': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None,
status=None))
after connection broken by 'ProxyError('Cannot connect to proxy.',
NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x04135930>: Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine actively refused
it',))': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None,
status=None)) after connection broken by 'ProxyError('Cannot connect to
proxy.',
NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x04135770>: Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine actively refused
it',))': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None,
status=None)) after connection broken by 'ProxyError('Cannot connect to
proxy.',
NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x04135870>: Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine actively refused
it',))': /simple/django/
Could not find a version that satisfies the requirement django (from
versions: )
No matching distribution found for django
发布于 2019-01-02 17:26:48
如果您使用的是windows,只需以管理员身份运行cmd即可。这可能会解决你的问题。
https://stackoverflow.com/questions/50988477
复制相似问题