Uploaded: Nov. 29 2025 | Modified: Nov. 29 2025
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.
Frequently Asked Questions (FAQ)
1. Do I need Python installed before installing Flask?
Yes. Flask is a Python framework, so you must install Python first. The tutorial uses python --version to verify it.
2. Can I install Flask without a virtual environment?
Yes, but it’s not recommended. A virtual environment keeps your project dependencies separate, preventing conflicts with other Python projects.
3. What is py -3 and why is it used?
py -3 tells Windows to use Python 3 specifically. This ensures Flask is installed with the correct interpreter.
4. How do I deactivate the virtual environment?
Simply run:
(venv) C:\myapp> deactivate
5. What should I do if flask command is not recognized?
This usually means:
- Your virtual environment is not activated, or
- Python Scripts path isn’t added to your environment variables.
Activate the venv again:
C:\myapp> .venv\Scripts\activate
Then try running the command again.
6. How do I upgrade Flask later?
(venv) C:\myapp> pip install --upgrade Flask
7. Can I use PowerShell instead of Command Prompt?
Yes, Flask works in CMD, PowerShell, and Windows Terminal. Just make sure to use the correct activation command for your shell.