本文介绍了找不到满足烧瓶要求的版本(来自版本:)找不到烧瓶的匹配发行版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用pip安装软件包时发生异常.我尝试安装numpy,flask和其他工具.但变得低于错误.

Exception occurs while installing package using pip. I tried installing numpy, flask and others. but getting below error.

C:\Users\ABC>pip install flask
Collecting flask
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667CB50>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C190>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C7F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C8F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C0F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
  Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask

请帮助解决该问题.点子版本是18.1Python版本是3.7

Please help resolving it.Pip version is 18.1Python version is 3.7

推荐答案

好吧,这是我一直以来都会遵循的hack,但每次都能奏效-我需要这样做,因为我的公司网络背后存在大量的分层安全性.

Okay, this is a hack that I always follow but works every time - I need to because my corp net is behind heavy layered security.

每次您需要安装pip pkgs时,请从cmd预先运行以下命令(无需成为管理员):

Every time you need to install pip pkgs, run the following commands beforehand from your cmd (you don't need to be Admin):

set http_proxy=http://your_corp_username:password@<your_corp_proxy_host>:<port>
set https_proxy=https://your_corp_username:password@<your_corp_proxy_host>:<port>

然后运行您常用的pip命令.

Then run your usual pip commands.

如果pip抛出一些SSL信任/解析错误.您还可以执行以下操作来信任您的网络的点子:

If pip throws some SSL trust/resolution error. You can also do the following to trust pip by your network:

pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install <some_package>

使用以下内容仅在当前用户下安装软件包(这不需要管理员特权)

Use the following for installing packages under current user only (this doesn't require Admin privileges)

pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install <some_package>  --user

这篇关于找不到满足烧瓶要求的版本(来自版本:)找不到烧瓶的匹配发行版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 14:23