mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
feat: 添加 python 版本检查
This commit is contained in:
parent
c151665419
commit
a4589327a6
7
main.py
7
main.py
|
@ -54,6 +54,13 @@ async def main_entry(loop: asyncio.AbstractEventLoop):
|
|||
|
||||
if __name__ == '__main__':
|
||||
import os
|
||||
import sys
|
||||
|
||||
# 必须大于 3.10.1
|
||||
if sys.version_info < (3, 10, 1):
|
||||
print("需要 Python 3.10.1 及以上版本,当前 Python 版本为:", sys.version)
|
||||
input("按任意键退出...")
|
||||
exit(1)
|
||||
|
||||
# 检查本目录是否有main.py,且包含QChatGPT字符串
|
||||
invalid_pwd = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user