0

I am trying to install flask using python pip in my linux machine having rhel7

-> 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)

Problem :

-> pip3.7 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 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

I tried to use below command as well but same error

python3.7 -m pip install flask
  • Possible duplicate of [Could not find a version that satisfies the requirement flask (from versions: ) No matching distribution found for flask](https://stackoverflow.com/questions/55021270/could-not-find-a-version-that-satisfies-the-requirement-flask-from-versions) – FlyingTeller Sep 05 '19 at 10:12

2 Answers2

0

I suggest that you look at this Flask documentation page. As mention in the documentation, you need to activate the environment and then proceed to install by running the command pip install Flask.

This doc also refers to Python 2.7 as well. Keep that in mind when following this doc.

maniSidhu98
  • 527
  • 2
  • 9
0

try this code:

pip3 install flask

Or:

pip install flask

Good luck.

i3bdulr7man
  • 57
  • 1
  • 5