-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.bat
29 lines (20 loc) · 874 Bytes
/
setup.bat
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
@echo off
rem ================== Setup python environment ===================
rem Option to accept a custom Python path
set /p python_executable="Enter the path to the Python executable (leave blank for default): "
rem Set the name of the virtual environment
set venv_name=venv
rem Set the path to the requirements.txt file
set requirements_file=requirements.txt
rem If a custom Python path is not provided, use the default python executable
if "%python_executable%"=="" (
set python_executable=python
)
rem Create a virtual environment
%python_executable% -m venv %venv_name%
rem Activate the virtual environment
call %venv_name%\Scripts\activate
rem Install dependencies from requirements.txt
pip install -r %requirements_file%
echo Virtual environment created and activated. Dependencies installed.
echo To deactivate the virtual environment, run: deactivate