mirror of https://github.com/Mai-with-u/MaiBot.git
feat: 校验 Python 版本
parent
4cc4482665
commit
564350df87
4
run.bat
4
run.bat
|
|
@ -1,6 +1,6 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
chcp 65001
|
chcp 65001
|
||||||
REM python -m venv venv
|
python -m venv venv
|
||||||
call venv\Scripts\activate.bat
|
call venv\Scripts\activate.bat
|
||||||
REM pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade -r requirements.txt
|
pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade -r requirements.txt
|
||||||
python run.py
|
python run.py
|
||||||
7
run.py
7
run.py
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import zipfile
|
import zipfile
|
||||||
|
import sys
|
||||||
import requests
|
import requests
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
|
@ -105,6 +105,11 @@ def install_napcat():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.system("cls")
|
os.system("cls")
|
||||||
|
if sys.version_info < (3, 9):
|
||||||
|
print("当前 Python 版本过低,最低版本为 3.9,请更新 Python 版本")
|
||||||
|
print("按任意键退出")
|
||||||
|
input()
|
||||||
|
exit(1)
|
||||||
choice = input(
|
choice = input(
|
||||||
"请输入要进行的操作:\n"
|
"请输入要进行的操作:\n"
|
||||||
"1.首次安装\n"
|
"1.首次安装\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue