fix: improve venv creation with error checking and proper validation

This commit is contained in:
2026-04-18 13:40:30 +00:00
parent 8b6dc0db33
commit 7b1f318916

View File

@@ -24,11 +24,12 @@ pkill -f "next-server" || true
pkill -f "local-ssl-proxy" || true pkill -f "local-ssl-proxy" || true
# 2. Setup/Activate Virtual Environment # 2. Setup/Activate Virtual Environment
if [ ! -d ".venv" ]; then if [ ! -f ".venv/bin/activate" ]; then
echo "🌑 Creating virtual environment (.venv)..." echo "🌑 Creating virtual environment (.venv)..."
python3 -m venv .venv rm -rf .venv
python3 -m venv .venv || { echo "❌ Failed to create venv"; exit 1; }
fi fi
source .venv/bin/activate source .venv/bin/activate || { echo "❌ Failed to activate venv"; exit 1; }
# 3. Check and Install Backend Dependencies # 3. Check and Install Backend Dependencies
echo "📦 Updating Python dependencies..." echo "📦 Updating Python dependencies..."