Prerequisites
Before installing the application, ensure you have the following installed on your system:Python 3.10+
Required for running the Flask application and data processing libraries
pip
Python package manager for installing dependencies
git
Version control system for cloning the repository
Virtual Environment
Recommended for isolating project dependencies
Python 3.10 or higher is required due to dependencies in the pandas and numpy libraries.
Installation Steps
Clone the Repository
First, clone the project repository to your local machine:
Replace
<YOUR_REPOSITORY_URL> with your actual Git repository URL.Create Virtual Environment
Create and activate a Python virtual environment to isolate project dependencies:
When activated, you’ll see
(venv) in your terminal prompt.Install Dependencies
Install all required Python packages using pip:This will install the following key dependencies:
| Package | Version | Purpose |
|---|---|---|
| Flask | 3.1.2 | Web framework |
| pandas | 2.3.2 | Data manipulation |
| openpyxl | 3.1.5 | Excel file handling |
| weasyprint | 66.0 | PDF generation |
| python-dotenv | 1.1.1 | Environment variable management |
Configure Environment Variables
Create a Add the following content to the To generate a secure secret key, use Python:Copy the generated key and paste it into your
.env file in the project root directory to store sensitive configuration:.env file:.env
.env file.Create Temp Directory
The application requires a
temp directory for storing processed files:The application will automatically create this directory if it doesn’t exist when you run
app.py, but creating it manually ensures proper setup.Directory Structure
After installation, your project structure should look like this:Running the Application
Once installation is complete, start the Flask development server:The application runs in debug mode by default, which provides helpful error messages and automatic reloading during development.
Troubleshooting
ImportError: No module named 'flask'
ImportError: No module named 'flask'
This means Flask is not installed. Ensure your virtual environment is activated and run:
KeyError: 'SECRET_KEY'
KeyError: 'SECRET_KEY'
The
.env file is missing or not properly configured. Create the file with a valid SECRET_KEY as described in Step 4.WeasyPrint installation fails
WeasyPrint installation fails
WeasyPrint requires system libraries for rendering. On Linux, install:On macOS with Homebrew:
Ubuntu/Debian
macOS
Permission denied when creating temp directory
Permission denied when creating temp directory
Run the mkdir command with appropriate permissions or create the directory manually with:
Next Steps
Quick Start Guide
Learn how to process your first CSV file and generate reports