Skip to content

Commit

Permalink
Fix setup logic... again
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Jun 3, 2023
1 parent 30ad3cf commit 985bf19
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ This will store a backup file with your current locally installed pip packages a

## Change History

* 2023/06/02 (v21.6.2)
* 2023/06/02 (v21.6.3)
- Fix install issue with setup logic
* 2023/06/02 (v21.6.2)
- Fix install issue with torch version
Expand Down
3 changes: 3 additions & 0 deletions gui.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set "yellow_text="
set "blue_text="
set "reset_text="

:: Deactivate the virtual environment
call .\venv\Scripts\deactivate.bat

REM Run pip freeze and capture the output
for /f "delims=" %%I in ('pip freeze') do (
set "pip_output=%%I"
Expand Down
30 changes: 17 additions & 13 deletions setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ set "yellow_text="
set "blue_text="
set "reset_text="

set PYTHON_VER=3.10.9

REM Check if Python version meets the recommended version
python --version 2>nul | findstr /b /c:"Python %PYTHON_VER%" >nul
if errorlevel 1 (
echo Warning: Python version %PYTHON_VER% is recommended.
)

IF NOT EXIST venv (
python -m venv venv
) ELSE (
echo venv folder already exists, skipping creation...
)

:: Deactivate the virtual environment
call .\venv\Scripts\deactivate.bat

REM Run pip freeze and capture the output
for /f "delims=" %%I in ('pip freeze') do (
set "pip_output=%%I"
Expand Down Expand Up @@ -52,19 +69,6 @@ if /i "%choice%"=="1" (
:ContinueSetup
endlocal

set PYTHON_VER=3.10.9

REM Check if Python version meets the recommended version
python --version 2>nul | findstr /b /c:"Python %PYTHON_VER%" >nul
if errorlevel 1 (
echo Warning: Python version %PYTHON_VER% is recommended.
)

IF NOT EXIST venv (
python -m venv venv
) ELSE (
echo venv folder already exists, skipping creation...
)
call .\venv\Scripts\activate.bat

REM Upgrade pip if needed
Expand Down

0 comments on commit 985bf19

Please sign in to comment.