From 7041a6dc88540fe23aa4273f3070f0837ff34641 Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Wed, 22 Apr 2026 18:30:58 +0300 Subject: [PATCH] fix(6): correct venv path in start_server.sh - create in project root - Virtual environment should be .venv in project root, not parent folder - Fix venv creation and activation path logic - Ensures venv is created and found in correct location --- start_server.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/start_server.sh b/start_server.sh index 8011f321..78639092 100755 --- a/start_server.sh +++ b/start_server.sh @@ -104,15 +104,17 @@ if [[ ! -f "requirements.txt" ]]; then log_error "backend/requirements.txt not found" fi -# Create and use Python virtual environment -VENV_DIR="../.venv" +# Create and use Python virtual environment in project root +VENV_DIR=".venv" if [[ ! -d "$VENV_DIR" ]]; then log_info " Creating Python virtual environment..." + cd - > /dev/null || true # Return to project root python3 -m venv "$VENV_DIR" || log_error "Failed to create virtual environment" + cd backend || log_error "Failed to enter backend directory" fi -# Activate virtual environment -source "$VENV_DIR/bin/activate" +# Activate virtual environment (from project root) +source "../$VENV_DIR/bin/activate" # Install dependencies if needed if ! python3 -c "import fastapi" &> /dev/null; then