0% found this document useful (0 votes)
4 views2 pages

Instruction Guide Python Flask

This guide provides step-by-step instructions for running a Flask app using a virtual environment. It covers downloading the project, creating and activating a virtual environment, installing dependencies, running the Flask app, and accessing it via a web browser. Finally, it includes a note on how to deactivate the virtual environment after use.

Uploaded by

Elaiza Cultura
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Instruction Guide Python Flask

This guide provides step-by-step instructions for running a Flask app using a virtual environment. It covers downloading the project, creating and activating a virtual environment, installing dependencies, running the Flask app, and accessing it via a web browser. Finally, it includes a note on how to deactivate the virtual environment after use.

Uploaded by

Elaiza Cultura
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Instruction Guide: Running a Flask App Using

Virtual Environment (venv)


1. Open your project folder and Download Project Web App
Download the web-app folder first:

[Link]

Make sure your Flask project's files are in one folder, including:

• [Link] (or whatever your main Flask file is)


• [Link]
• Other modules/templates/static folders

You can open the folder using CMD/Terminal:

cd path/to/your/project

2. Create a Virtual Environment


Run:

python -m venv venv

This will create a folder named venv containing your isolated Python environment.

3. Activate the Virtual Environment


Windows (CMD)

venv\Scripts\activate

Windows (PowerShell)

.\venv\Scripts\Activate

MacOS / Linux

source venv/bin/activate

Once activated, you should see:


(venv)

before your command prompt.

4. Install Dependencies from [Link]

Make sure [Link] is inside your project folder, then run:

• pip install -r [Link]

This will install all needed packages including Flask.

5. Run Your Flask App


If your app uses the basic [Link]:

python [Link]

Windows (CMD)

set FLASK_APP=[Link]

Then start the server:

flask run

6. Access the Flask App


Open your browser and go to:

[Link]

7. Deactivate the Virtual Environment


After you're done:

deactivate

You might also like