mirror of
https://github.com/freedbygrace/SQL.git
synced 2026-07-26 11:28:16 +00:00
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:
@@ -195,9 +195,36 @@ echo ""
|
|||||||
|
|
||||||
# Generate CSV files using Python
|
# Generate CSV files using Python
|
||||||
echo -e "${CYAN}Generating CSV files...${NC}"
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${RED}✗ CSV generation failed${NC}"
|
echo -e "${RED}✗ CSV generation failed${NC}"
|
||||||
|
echo -e "${YELLOW}Check the error message above for details${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -81,10 +81,26 @@ install_python() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
windows)
|
windows)
|
||||||
echo -e "${YELLOW}On Windows, please install Python 3 manually:${NC}"
|
echo -e "${YELLOW}⚠ Windows detected - Python 3 installation required${NC}"
|
||||||
echo -e " 1. Download from: https://www.python.org/downloads/"
|
echo ""
|
||||||
echo -e " 2. Or use WSL2 with Ubuntu"
|
echo -e "${CYAN}Option 1: Microsoft Store (Easiest)${NC}"
|
||||||
echo -e " 3. Make sure to check 'Add Python to PATH' during installation"
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user