Image Classification
English
furry
e621
Not-For-All-Audiences
RedHotTensors commited on
Commit
57ea205
·
1 Parent(s): bc3596c

Check python version in install.bat and do not auto-install.

Browse files
Files changed (5) hide show
  1. app.bat +4 -1
  2. checkver.py +9 -0
  3. easy.bat +0 -12
  4. inference.bat +4 -1
  5. install.bat +9 -0
app.bat CHANGED
@@ -1,6 +1,9 @@
1
  @echo off
2
 
3
- IF NOT EXIST venv call .\install.bat
 
 
 
4
  call venv\Scripts\activate.bat
5
 
6
  echo To view the WebUI, copy and paste the link after "Running on local URL:" into your web browser.
 
1
  @echo off
2
 
3
+ IF NOT EXIST venv (
4
+ echo JTP-3 requirements are not installed. Run install.bat to install.
5
+ exit /b
6
+ )
7
  call venv\Scripts\activate.bat
8
 
9
  echo To view the WebUI, copy and paste the link after "Running on local URL:" into your web browser.
checkver.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import print_function
2
+ import sys
3
+
4
+ if not (
5
+ sys.version_info[0] == 3
6
+ and sys.version_info[1] >= 20
7
+ ):
8
+ print("Python 3.11 or later is required. The installed version is " + sys.version.split()[0] + ".")
9
+ sys.exit(1)
easy.bat CHANGED
@@ -5,11 +5,6 @@ echo JTP-3 Hydra Easy Mode
5
  echo =========================================
6
  echo.
7
 
8
- echo Python 3.11 or later is required. Your Python version is:
9
- python -V
10
- if %errorlevel% neq 0 goto bad_python
11
- echo.
12
-
13
  IF EXIST venv goto ready
14
 
15
  :install_loop
@@ -106,10 +101,3 @@ echo.
106
  git pull
107
  echo.
108
  goto menu
109
-
110
- :bad_python
111
- echo.
112
- echo Python doesn't seem to be installed and available on your PATH.
113
- echo Try ^(re^)installing Python from https://www.python.org/downloads/windows/. Version 3.11 or later is required.
114
- pause
115
- exit /b
 
5
  echo =========================================
6
  echo.
7
 
 
 
 
 
 
8
  IF EXIST venv goto ready
9
 
10
  :install_loop
 
101
  git pull
102
  echo.
103
  goto menu
 
 
 
 
 
 
 
inference.bat CHANGED
@@ -1,6 +1,9 @@
1
  @echo off
2
 
3
- IF NOT EXIST venv call .\install.bat
 
 
 
4
  call venv\Scripts\activate.bat
5
 
6
  python inference.py %*
 
1
  @echo off
2
 
3
+ IF NOT EXIST venv (
4
+ echo JTP-3 requirements are not installed. Run install.bat to install.
5
+ exit /b
6
+ )
7
  call venv\Scripts\activate.bat
8
 
9
  python inference.py %*
install.bat CHANGED
@@ -1,5 +1,14 @@
1
  @echo off
2
  echo ========== Installing Requirements ==========
 
 
 
 
 
 
 
 
 
3
 
4
  python -m venv venv
5
  if %errorlevel% neq 0 goto error
 
1
  @echo off
2
  echo ========== Installing Requirements ==========
3
+ echo.
4
+
5
+ python checkver.py
6
+ if %errorlevel% neq 0 (
7
+ echo.
8
+ echo Try ^(re^)installing Python from https://www.python.org/downloads/windows/. Version 3.11 or later is required.
9
+ echo.
10
+ goto error
11
+ )
12
 
13
  python -m venv venv
14
  if %errorlevel% neq 0 goto error