diff --git a/deploy.sh b/deploy.sh index 4aeb09e..9d26258 100644 --- a/deploy.sh +++ b/deploy.sh @@ -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 diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index be6bf63..ea1310f 100644 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -81,10 +81,26 @@ install_python() { fi ;; windows) - echo -e "${YELLOW}On Windows, please install Python 3 manually:${NC}" - echo -e " 1. Download from: https://www.python.org/downloads/" - echo -e " 2. Or use WSL2 with Ubuntu" - echo -e " 3. Make sure to check 'Add Python to PATH' during installation" + echo -e "${YELLOW}⚠ Windows detected - Python 3 installation required${NC}" + echo "" + echo -e "${CYAN}Option 1: Microsoft Store (Easiest)${NC}" + echo -e " 1. Open Microsoft Store" + echo -e " 2. Search for 'Python 3.12' or 'Python 3.11'" + echo -e " 3. Click 'Get' or 'Install'" + echo -e " 4. Close and reopen PowerShell" + echo "" + echo -e "${CYAN}Option 2: Official Installer${NC}" + echo -e " 1. Visit: ${GREEN}https://www.python.org/downloads/${NC}" + echo -e " 2. Download Python 3.12 or later" + echo -e " 3. Run installer" + echo -e " 4. ✅ CHECK 'Add Python to PATH' during installation" + echo -e " 5. Close and reopen PowerShell" + echo "" + echo -e "${CYAN}After installation, verify:${NC}" + echo -e " ${GREEN}python --version${NC} (should show Python 3.x.x)" + echo "" + echo -e "${YELLOW}Then re-run: ./deploy.sh${NC}" + echo "" exit 1 ;; *)