Add Python installation detection and Windows-specific instructions

DEPLOY SCRIPT IMPROVEMENTS:

- Added explicit Python availability check before CSV generation

- Supports both python3 and python commands (Windows uses 'python')

- Clear error message if Python is not installed

- Windows-specific installation instructions with Microsoft Store option

- Linux/macOS instructions to run dependency installer

- Prevents silent failures when Python is missing

DEPENDENCY INSTALLER ENHANCEMENTS:

- Enhanced Windows section with detailed installation steps

- Added Microsoft Store option (easiest for Windows users)

- Added official Python installer option with PATH checkbox reminder

- Clear verification command: python --version

- Instructions to close/reopen PowerShell after installation

PROBLEM SOLVED:

- CSV import was showing 0 rows because Python script never ran

- Python not installed on Windows by default

- Script failed silently without clear error message

- Users now get clear instructions on how to install Python

NEXT STEPS FOR USERS:

1. Install Python 3 from Microsoft Store or python.org

2. Close and reopen PowerShell

3. Run ./deploy.sh again

4. CSV generation will work and data will persist
This commit is contained in:
Alphaeus Mote
2025-10-24 12:55:28 -04:00
parent 23b7afb33e
commit a7e2fea1ba
2 changed files with 48 additions and 5 deletions
+28 -1
View File
@@ -195,9 +195,36 @@ echo ""
# Generate CSV files using Python
echo -e "${CYAN}Generating CSV files...${NC}"
python3 scripts/generate_csv_data.py
# Check if Python is available
if ! command -v python3 >/dev/null 2>&1 && ! command -v python >/dev/null 2>&1; then
echo -e "${RED}✗ Python 3 is not installed${NC}"
echo ""
echo -e "${YELLOW}Python 3 is required for CSV data generation.${NC}"
echo ""
echo -e "${CYAN}On Windows:${NC}"
echo -e " 1. Open Microsoft Store and search for 'Python 3.12'"
echo -e " 2. Or download from: ${GREEN}https://www.python.org/downloads/${NC}"
echo -e " 3. Make sure to check 'Add Python to PATH' during installation"
echo -e " 4. Close and reopen PowerShell"
echo -e " 5. Re-run: ${GREEN}./deploy.sh${NC}"
echo ""
echo -e "${CYAN}On Linux/macOS:${NC}"
echo -e " Run: ${GREEN}./scripts/install-dependencies.sh${NC}"
echo ""
exit 1
fi
# Try python3 first, fall back to python
if command -v python3 >/dev/null 2>&1; then
python3 scripts/generate_csv_data.py
else
python scripts/generate_csv_data.py
fi
if [ $? -ne 0 ]; then
echo -e "${RED}✗ CSV generation failed${NC}"
echo -e "${YELLOW}Check the error message above for details${NC}"
exit 1
fi