How to install FLASK in Windows 10

Windows Articles

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...

How to install Trisquel 9.0

A few days ago we talked about the release of Trisquel 9.0, this distro is based on the Ubuntu 18.04 LTS packages....

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

Today we will see how to install FLASK in Windows 10. This is a framework written in Python designed to create web applications. Also, it offers to do it quickly and without having to enter and edit many lines of code. It is based on the WSGI specification by Werkzeug and the Jinja2 template engine. On the other hand, it has a BSD license. Some of its features are the following:

  • It is based on Unicode
  • WSGI compliant
  • Allows the execution of individual tests
  • It has development servers and debugging features
  • Use Jinja2 template styles
  • Allows the creation of secure cookies for sites

Prerequisite

As mentioned, this is an application written in Python. Consequently, it is essential to have this language installed. To know how to do it, see our tutorial.

How to download and install Flask in Windows 10. Step by step.

In the first place, it is necessary to create a folder where you will save the configuration of the app. With this in mind, we will create it inside Documents and call it my_flask.

Then open a CMD as an administrator from the folder location and run the following command:

py -m venv env

With this command we have created the virtual environment of Flask. In effect, all you have to do is go to the folder and look at the content.

Back to the terminal, please run the following command to activate the environment:

env\Scripts\activate

Now, install Flask with the following command:

pip install flask
Installing Flask on Windows 10
Installing Flask on Windows 10

Once Flask is downloaded and installed, the wizard recommends updating the pip. With this in mind, run the following command:

python.exe -m pip install --upgrade pip
Updating the PIP version
Updating the PIP version

Creating the configuration file.

Now it’s time to create an app.py file. Consequently, some advanced text editor like Notepad++ is recommended. Finally, save it in the newly created folder.

Creating the app.py file
Creating the app.py file

Then, please establish the application with the following order:

set FLASK_APP=app.py

Then open the app.py file and add the following lines:

from flask import Flask
app = Flask(name)
@app.route('/')
def index():
return '<h1>Hello</h1>'
Editing the configuration file
Editing the configuration file

To run this environment go to the terminal and there run:

flask run

Then, select the assigned IP address in the terminal. Then open it in any browser.

Flask application running successfully in a browser
Flask application running successfully in a browser

Ultimately we have seen how you install Flask on Windows 10. Besides, it is written in python so it has a great support. See you later!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...

How to install Trisquel 9.0

A few days ago we talked about the release of Trisquel 9.0, this distro is based on the Ubuntu 18.04 LTS packages....

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...
x