How to install Flask on Ubuntu 18/20

Flask is an open-source micro web framework for Python designed to help developers to build secure, scalable, and maintainable web applications. Here I am providing the steps to install Flask on an Ubuntu server. 

  1. Login to the server as a privileged user.
  2. Check if Python 3 is already there. Python 3 will be installed by default and you can verify it by using the following command:
    #python3 -V
  3. Install Venv module:
    # sudo apt install python3-venv
  4. Once it is installed, need to create a virtual environment by running the following command in the home directory by selecting the appropriate directory.
    # cd /home/domain.com/public_html/app
    # python3 -m venv venv
  5. Once it is done, we need to install Flask.
    # pip install Flask
  6. You can verify the installation using the following: 
    #python -m flask --version
    Python 3.6.9
    Flask 2.0.3
    Werkzeug 2.0.3
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install and Use Docker on Ubuntu 16.04

Introduction Docker is an application that makes it simple and easy to run application processes...

Change Main IP of the server :: Vesta Panel

If we are changing the main IP of a server installed with Vesta panel, we can use the following...

cPanel: Apache-FastCGI Data Timeout Error

If you are using a cPanel server and have FastCGI enabled in Apache, you might be facing the...

Domainkey installer in cPanel

You can use the following cPanel script to install domainkey for an account...

Email issues :: Common Troubleshooting Steps

Here I will discuss some common errors and their solution: We are using a mail relay setup for...