无法建立新连接:[WinError 10061]无法建立连接,因为目标计算机主动拒绝连接

问题描述 投票:0回答:2

通过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
python django httpurlconnection
2个回答
-1
投票

如果您使用的是Windows,请以管理员身份运行cmd。这可能会解决您的问题。


-1
投票
  1. 像这样设置代理设置: import telebot **from telebot import apihelper** bot = telebot.TeleBot( tkn ) **apihelper.proxy = { 'https': 'socks5://swcbbabh:зфыыцщкв@ley.vivalaresistance.info:3306' }** @bot.message_handler(commands=['start', 'help']) ...
  2. 更新gunicorn,请求和PySocks。
  3. 重启应用程序。
© www.soinside.com 2019 - 2024. All rights reserved.