首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用python3.7和pip3.7安装flask

无法使用python3.7和pip3.7安装flask
EN

Stack Overflow用户
提问于 2019-09-05 06:51:30
回答 2查看 500关注 0票数 0

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

代码语言:javascript
复制
-> 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安装烧瓶

代码语言:javascript
复制
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

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

代码语言:javascript
复制
python3.7 -m pip install flask
EN

回答 2

Stack Overflow用户

发布于 2020-09-05 05:58:10

尝试以下代码:

pip3 install flask

或者:

pip install flask

祝好运。

票数 0
EN

Stack Overflow用户

发布于 2019-09-05 07:20:11

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

本文档还提到了Python2.7。在阅读本文时,请牢记这一点。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57796463

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档