How to Install Flask on Windows 11 (Beginner-Friendly Step-by-Step Guide)
Flask is a lightweight and flexible Python web framework that's perfect for beginners. In this step-by-step tutorial, you'll learn how to install Flask on Windows 11, set up a virtual environment, and confirm your installation successfully.
1. Check Your Python Version
Before installing Flask, make sure Python is installed on your system. Run this command in Command Prompt (CMD):
C:\> python --version
If you don't have Python installed, download it from the official Python website.
2. Create Your Application Directory
Create a new folder where your Flask project will live:
C:\> mkdir myapp
Then move into that directory:
C:\> cd myapp
Your path should now look like this:
C:\myapp>
3. Set Up a Virtual Environment
Create a virtual environment inside your project folder. This keeps your project dependencies isolated:
C:\myapp> py -3 -m venv .venv
Activate your virtual environment:
C:\myapp> .venv\Scripts\activate
You should now see (venv) at the start of your command line:
(venv) C:\myapp>
4. Install Flask Framework
With your virtual environment activated, install Flask using pip:
(venv) C:\myapp> pip install Flask
This will download and install the latest version of Flask and its dependencies.
5. Verify Flask Installation
After installation, confirm that Flask is installed correctly:
(venv) C:\myapp> flask --version
You can also check details using:
(venv) C:\myapp> pip show Flask
Or verify it inside Python:
(venv) C:\myapp> python
>>> import importlib
>>> importlib.metadata.version('flask')
If Flask's version number appears, your installation is successful!
Congratulations! You've successfully installed Flask on Windows 11. You can now start building your first Flask app.