
Do not use it in a production deployment. * Serving Flask app 'helloworld.py' (lazy loading) Now, if you are using Flask on a local computer, you can test it with the following command flask run Now, add the following code from flask import Flask To do this, create a file with some code. Werkzeug 2.0.1 Testing the Flask installationĪs I always say, if we don’t test the installation then we won’t know if the process is correct. You will see that the prompt changes and now proceed to install Flask using PIP pip install FlaskĪfter the process finishes you will be able to check the installed version with this command python -m flask -version Now, activate the virtual environment source venv/bin/activate Once in the folder, you need to create the virtual environment with the following command python3 -m venv venv You can name it whatever you want but I will choose project. Now create a new folder where your Flask project will be located. Python-pip-whl python3-venv python3.8-venvĠ upgraded, 3 newly installed, 0 to remove and 19 not upgraded.Īfter this operation, 2,350 kB of additional disk space will be used.

The following NEW packages will be installed: The following additional packages will be installed: This way the installation will be more secure.


Now, install python along with its dependencies as well as the package needed to create a virtual environment. To do this run in a terminal: sudo apt update So, today we are going to install it without problems on Ubuntu 20.04 Install Flask on Ubuntu 20.04īefore you start make sure that the whole system is up to date.
