Files
27-combi/fix_venv.sh
2026-02-09 21:51:30 -08:00

37 lines
932 B
Bash
Executable File

#!/bin/bash
# Helper script to fix virtual environment issues
echo "=== Fixing Virtual Environment ==="
echo ""
# Remove any existing venv
if [ -d "venv" ]; then
echo "Removing existing virtual environment..."
rm -rf venv
echo "✅ Removed"
fi
# Check if python3-venv is installed
echo ""
echo "Checking if python3-venv is installed..."
if python3 -m venv /tmp/test_venv_check_$$ 2>/dev/null; then
rm -rf /tmp/test_venv_check_$$
echo "✅ venv module is working"
echo ""
echo "You can now run: ./generate_excel.sh"
else
echo "❌ venv module is not working"
echo ""
PYTHON_VERSION=$(python3 --version 2>&1 | grep -oP '\d+\.\d+' | head -1)
echo "Install the venv package with:"
echo " sudo apt install python${PYTHON_VERSION}-venv"
echo ""
echo "Or:"
echo " sudo apt install python3-venv"
echo ""
echo "After installing, run: ./generate_excel.sh"
fi
echo ""