-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement support to setup venv with python 3.10.x on windows (#2444)
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@echo off | ||
|
||
IF NOT EXIST venv ( | ||
echo Creating venv... | ||
py -3.10 -m venv venv | ||
) | ||
|
||
:: Create the directory if it doesn't exist | ||
mkdir ".\logs\setup" > nul 2>&1 | ||
|
||
:: Deactivate the virtual environment to prevent error | ||
call .\venv\Scripts\deactivate.bat | ||
|
||
call .\venv\Scripts\activate.bat | ||
|
||
REM Check if the batch was started via double-click | ||
IF /i "%comspec% /c %~0 " equ "%cmdcmdline:"=%" ( | ||
REM echo This script was started by double clicking. | ||
cmd /k python .\setup\setup_windows.py | ||
) ELSE ( | ||
REM echo This script was started from a command prompt. | ||
python .\setup\setup_windows.py %* | ||
) | ||
|
||
:: Deactivate the virtual environment | ||
call .\venv\Scripts\deactivate.bat |