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.
- Login to the server as a privileged user.
- 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
- Install Venv module:
# sudo apt install python3-venv
- 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 - Once it is done, we need to install Flask.
# pip install Flask
- You can verify the installation using the following:
#python -m flask --version
Python 3.6.9
Flask 2.0.3
Werkzeug 2.0.3