Flask Basics & Installation

Last Updated : 1 Oct, 2026

Flask is a lightweight Python web framework used to build web applications and APIs. Before installing Flask, Python and pip should be available on your system.

  • Flask can be installed using Python's package manager, pip.
  • Using a virtual environment keeps Flask and other project dependencies isolated.
  • The installation process is similar across Windows, macOS, and Linux.

Installation

Before installing Flask, make sure Python is installed on your system.

python --version

On some macOS and Linux systems, use:

python3 --version

Screenshot-2026-03-20-125742

If these commands display the installed versions, you can proceed with the Flask installlation.

Windows

Flask recommends using a virtual environment so that packages installed for one project do not interfere with other projects.

1. Install flask using pip:

pip install Flask

tt

2. Verify that Flask was installed successfully:

flask --version

If the installation was successful, the command displays the installed Flask version along the related package information.

Linux/macOS

Here, as well it is recommended to use virtual environment, for the particular Flask project.

1. Install Flask using pip command:

pip install Flask

2. Check if Flask is successfully installed or not. Open the python shell and try to import Flask is installed correctly:

check-flask-installation
Comment