【问题标题】:Unable to install flask using python3.7 and pip3.7无法使用 python3.7 和 pip3.7 安装烧瓶
【发布时间】:2019-09-04 22:51:29
【问题描述】:

我正在尝试在具有 rhel7 的 linux 机器上使用 python pip 安装烧瓶

-> python3.7 --version
Python 3.7.2
-> pip3.7 --version
pip 18.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

问题:

-> pip3.7 安装烧瓶

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 0x7fad3a9f60b8>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /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 0x7fad3a9f6128>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /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 0x7fad3a9f6390>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /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 0x7fad3a9f6358>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /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 0x7fad3a9f64e0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flask/
  Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask

我也尝试使用下面的命令,但同样的错误

python3.7 -m pip install flask

【问题讨论】:

标签: python-3.x pip rhel7


【解决方案1】:

试试这个代码:

pip3 install flask

或者:

pip install flask

祝你好运。

【讨论】:

    【解决方案2】:

    我建议你看看这个Flask documentation page。如文档中所述,您需要 activate the environment 然后通过运行命令 pip install Flask 继续安装。

    这个文档也提到了 Python 2.7。关注本文档时请记住这一点。

    【讨论】:

    • sudo /usr/local/bin/python3.7 -m pip install flask --proxy="host:port"
    • 太棒了!不要忘记为该帖子点赞,以表扬回答问题的人。
    猜你喜欢
    • 1970-01-01
    • 2020-08-11
    • 1970-01-01
    • 1970-01-01
    • 2021-09-29
    • 1970-01-01
    • 1970-01-01
    • 2013-06-04
    • 1970-01-01
    相关资源
    最近更新 更多