close

[Solved] execute hello world with flask “ImportError: No module named flask”

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error execute hello world with flask “ImportError: No module named flask” in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How execute hello world with flask “ImportError: No module named flask” Error Occurs?

Today I get the following error execute hello world with flask “ImportError: No module named flask” in python.

How To Solve execute hello world with flask “ImportError: No module named flask” Error ?

  1. How To Solve execute hello world with flask “ImportError: No module named flask” Error ?

    To Solve execute hello world with flask “ImportError: No module named flask” ErrorYou've installed flask for python2 you need to use sudo pip3 install … to get it for python3. I had spent a day when I got that I was using pip for python 2.

  2. execute hello world with flask “ImportError: No module named flask”

    To Solve execute hello world with flask “ImportError: No module named flask” ErrorYou've installed flask for python2 you need to use sudo pip3 install … to get it for python3. I had spent a day when I got that I was using pip for python 2.

Solution 1

You don’t have installed flask

Linux:

Install flask as global package:

sudo pip install flask

Install in virtualenv

virtualenv venv
source venv
pip install flask

Install system package

  • debian, ubuntuapt-get install python-flask
  • archpacman -S python-flask
  • fedorayum install python-flask

Install via Anaconda

conda install flask

Windows:

python -m pip install flask

Solution 2

You’ve installed flask for python2 you need to use sudo pip3 install … to get it for python3. I had spent a day when I got that I was using pip for python 2.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read