-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
62 lines (51 loc) · 1.48 KB
/
Copy pathsetup.sh
File metadata and controls
62 lines (51 loc) · 1.48 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Setup script for Brampton Traffic Scorer
echo "=== Brampton Traffic Scorer Setup ==="
echo ""
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.8 or higher."
exit 1
fi
echo "✓ Python 3 found: $(python3 --version)"
echo ""
# Create virtual environment (optional but recommended)
echo "Creating virtual environment..."
python3 -m venv venv
if [ $? -ne 0 ]; then
echo "⚠ Could not create virtual environment. Continuing without it..."
else
echo "✓ Virtual environment created"
echo ""
echo "Activating virtual environment..."
# Activate virtual environment
if [ -f "venv/bin/activate" ]; then
source venv/bin/activate
echo "✓ Virtual environment activated"
else
echo "⚠ Could not activate virtual environment"
fi
fi
echo ""
echo "Installing dependencies..."
pip install -r requirements.txt
if [ $? -ne 0 ]; then
echo "❌ Failed to install dependencies"
exit 1
fi
echo ""
echo "✓ Dependencies installed successfully"
echo ""
echo "=== Setup Complete ==="
echo ""
echo "Next steps:"
echo "1. Run the example: python3 traffic_scorer.py"
echo "2. Or try the examples: python3 example_usage.py"
echo ""
echo "Note: First run will download data (~2-5 minutes). Subsequent runs are instant."
echo ""
if [ -d "venv" ]; then
echo "To activate the virtual environment later, run:"
echo " source venv/bin/activate"
echo ""
fi