Error Python Lab Question4-6 (Python flask category)

When run the # python app.py command following message appears

thor@host01 /opt/simple-webapp-flask$ python app.py
Traceback (most recent call last):
File “app.py”, line 2, in
from flask import Flask
ImportError: No module named flask
thor@host01 /opt/simple-webapp-flask$

Could you provide me with the lab link?

Try to install flask:

pip install flask

Same Output

thor@host01 /opt$ sudo pip install flask --upgrade
Collecting flask
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting Jinja2>=2.10.1
Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug>=0.15
Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting itsdangerous>=0.24
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting click>=5.1
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl (32 kB)
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, click, flask
Successfully installed Jinja2-2.11.3 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 flask-1.1.2 itsdangerous-1.1.0
thor@host01 /opt$ cd simple-webapp-flask/
thor@host01 /opt/simple-webapp-flask$ python app.py
Traceback (most recent call last):
File “app.py”, line 2, in
from flask import Flask
ImportError: No module named flask
thor@host01 /opt/simple-webapp-flask$

Correct me If I have done anything wrong

Just Run ```
sudo pip install Flask

then` python3 app.py` not python

Now it’s work… Thank you