How To Install Flask In Ubuntu?


Flask is a microframework of Python and if you are a beginner and you want to set-up of the flask in your Linux system then this tutorial for you.

In this tutorial, we will install flask till project app directories, in our Debian based operating system.
Now, just open your Terminal (CTRL+ALT+T) and ready to install Flask step by step.

1.Create An Application Directory using git:

$ git clone
$ cd flask 

2.Create a virtual environment with python3
   You are now going to create a virtual environment inside the flask directory.

$ sudo apt-get install python3-venv
$ python3 -m venv virtual-environment-name
$ python3 -m venv venv

3.Working with virtual Environment and activate source files in created flaky directory:

$ source venv/bin/activate
Now, You can see your virtual environment created and you see like this in your terminal

4.Installing Python Packages with pip

(venv) $ pip3 install flask

after installing flask using pip then if you want to show your all dependencies, just type :

(venv) $ pip freeze


Now, You can check or verify that you installed or not flask in your system

 (venv) $ python3
 >>> import flask
If you show no error appear, now you can congratulate yourself that you ready to work on flask framework
5.Create your first project in flask and save it e.g (

6. Start your Development Server

(venv) $ export
(venv) $ flask run
* Serving Flask app "hello"
* Running on (Press CTRL+C to quit)

Now, open your browser and paste this if you got it, congratulate yourself.
If you face any problem just comment in the comment box and please don't hesitate to contact us.  

Post a Comment


We welcome your feedback and thoughts – please share your comments!

Post a Comment