我正在尝试使用pip安装一些软件包,但始终出现以下错误消息。
pip3 install flask
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/flask/
Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
我尝试安装多个软件包(numpy,scipy和matplotlib),所有软件包均失败,并显示类似的错误消息。
我尝试在命令中使用include --trusted-host pypi.org --trusted-host files.pythonhosted.org
(如this回答),并使用easy_install,但没有一个起作用。
这不是我的防火墙的问题,因为关闭防火墙后它仍然无法工作。
P.S .:我正在使用虚拟环境,但这似乎并不影响结果。而且,当我尝试通过浏览器访问pypi时,大多数情况下都显示无法访问该网站。