首页 > 解决方案 > 每当我尝试安装新的 python 包时出现错误

问题描述

当我在 cmd 上运行 pip install selenium 时,会出现此错误

C:\Users\Shaharyar Parekh\AppData\Local\Programs\Python\Python36-32\Scripts>pip install selenium
Collecting selenium
  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 0x06455C30>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/selenium/
  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 0x06455DF0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/selenium/
  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 0x06455CF0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/selenium/
  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 0x06455BF0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/selenium/
  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 0x06455D70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))': /simple/selenium/
  Could not find a version that satisfies the requirement selenium (from versions: )
No matching distribution found for selenium

我尝试重新安装python解释器几次,但没有解决问题

标签: pythonwindowspython-3.x

解决方案


在我的代理设置中输入了错误的代理地址和端口。这就是为什么这个错误不断弹出


推荐阅读