-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·31 lines (25 loc) · 888 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·31 lines (25 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
if [ -d ".venv" ]; then
echo "Virtual environment already exists. Removing it and creating a new one."
rm -rf .venv
fi
echo "Creating virtual environment in .venv directory..."
python3 -m venv .venv
if [ ! -d ".venv" ]; then
echo "Error: Failed to create virtual environment."
echo "Please ensure Python 3 is installed and in your PATH."
exit 1
fi
echo "Activating virtual environment..."
source .venv/bin/activate
echo "Installing dependencies..."
python3 -m pip install .
if [ $? -eq 0 ]; then
echo "================================================"
echo "Setup complete! Please run the following command to activate your environment:"
echo "source .venv/bin/activate"
echo "================================================"
else
echo "Error: Failed to install dependencies."
echo "Please check the error messages above."
fi