Skip to content

Commit f3f5677

Browse files
committed
Добавлена проверка Python
1 parent 1dfc4ad commit f3f5677

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

start.bat

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ REM Восстанавливаем оригинальный файл config.json
1515
copy /Y config_temp.json config.json
1616
del config_temp.json
1717

18+
REM Checking for Python version
19+
python -c "import sys; print(sys.version_info[:2])" > version.txt
20+
set /p version=<version.txt
21+
IF "%version%" LSS "3.10" (
22+
echo Your version of Python is not supported. Please install Python 3.10
23+
exit /b
24+
)
25+
IF "%version%" GEQ "3.11" (
26+
echo Your version of Python is not supported. Please install Python 3.10
27+
exit /b
28+
)
29+
1830
python -m venv venv
1931
call venv\Scripts\activate.bat
2032
python -m pip install --upgrade pip
@@ -51,6 +63,4 @@ IF "%language%"=="ru_RU" (
5163
python webui_en.py
5264
)
5365

54-
pause
55-
56-
:: Упаковано и собрано telegram каналом Neurogen News: https://t.me/neurogen_news
66+
pause

start_endpoint.bat

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ REM Восстанавливаем оригинальный файл config.json
1212
copy /Y config_temp.json config.json
1313
del config_temp.json
1414

15+
REM Checking for Python version
16+
python -c "import sys; print(sys.version_info[:2])" > version.txt
17+
set /p version=<version.txt
18+
IF "%version%" LSS "3.10" (
19+
echo Your version of Python is not supported. Please install Python 3.10
20+
exit /b
21+
)
22+
IF "%version%" GEQ "3.11" (
23+
echo Your version of Python is not supported. Please install Python 3.10
24+
exit /b
25+
)
26+
1527
python -m venv venv
1628
call venv\Scripts\activate.bat
1729
python -m pip install --upgrade pip
@@ -39,6 +51,4 @@ echo Completed.
3951
echo Running NeuroGPT...
4052

4153
python endpoint.py
42-
pause
43-
44-
:: Упаковано и собрано telegram каналом Neurogen News: https://t.me/neurogen_news
54+
pause

0 commit comments

Comments
 (0)