Skip to content

Commit 6028c7c

Browse files
Update setup.bat
1 parent 0cf55e0 commit 6028c7c

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

setup.bat

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
1-
@echo off
1+
#!/bin/bash
22

3-
:: This is a setup script for the Python project
3+
# This is a setup script for the Python project
44

5-
echo Setting up the Python environment...
5+
echo "Setting up the Python environment..."
66

7-
:: Install dependencies
8-
if exist %SystemRoot%\System32\pip.exe (
9-
echo Installing Python dependencies...
7+
# Add Python Scripts directory to PATH
8+
PYTHON_SCRIPTS_DIR="C:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python<version>\\Scripts"
9+
if [ -d "$PYTHON_SCRIPTS_DIR" ]; then
10+
export PATH="$PATH:$PYTHON_SCRIPTS_DIR"
11+
echo "Added Python Scripts directory to PATH."
12+
else
13+
echo "Error: Python Scripts directory not found. Make sure to update the script with the correct path."
14+
exit 1
15+
fi
16+
17+
# Install dependencies
18+
if command -v pip &> /dev/null; then
19+
echo "Installing Python dependencies..."
1020
pip install -r requirements.txt
11-
) else (
12-
echo Error: pip not found. Please install Python and pip first.
13-
exit /b 1
14-
)
21+
else
22+
echo "Error: pip not found. Please install Python and pip first."
23+
exit 1
24+
fi
1525

16-
:: Run the main Python script
17-
echo Running main.py...
26+
# Run the main Python script
27+
echo "Running main.py..."
1828
python main.py
1929

20-
echo Setup complete! You're ready to start working on your Python project.
30+
echo "Setup complete! You're ready to start working on your Python project."

0 commit comments

Comments
 (0)