remove waiting for input on version mismatch warning, change supported versions
This commit is contained in:
parent
28c4c9b907
commit
7d1f2a3a49
|
@ -33,4 +33,3 @@ notification.mp3
|
||||||
/test/stdout.txt
|
/test/stdout.txt
|
||||||
/test/stderr.txt
|
/test/stderr.txt
|
||||||
/cache.json
|
/cache.json
|
||||||
no_py_ver_warning
|
|
||||||
|
|
35
launch.py
35
launch.py
|
@ -18,35 +18,24 @@ skip_install = False
|
||||||
|
|
||||||
|
|
||||||
def check_python_version():
|
def check_python_version():
|
||||||
if not os.path.isfile("no_py_ver_warning"):
|
version = sys.version_info
|
||||||
version = sys.version_info
|
if platform.system() == "Windows":
|
||||||
version_range = None
|
supported_minors = [10]
|
||||||
if platform.system() == "Linux":
|
else:
|
||||||
version_range = range(7 + 1, 11 + 1)
|
supported_minors = [7, 8, 9, 10, 11]
|
||||||
else:
|
|
||||||
version_range = range(7 + 1, 10 + 1)
|
|
||||||
|
|
||||||
try:
|
if not (version.major == 3 and version.minor in supported_minors):
|
||||||
assert version.major == 3 and version.minor in version_range, f"""
|
import modules.errors
|
||||||
=== Warning ===
|
|
||||||
This program was tested only with 3.10 Python, but you have {version.major}.{version.minor} Python.
|
modules.errors.print_error_explanation(f"""
|
||||||
|
This program is tested with 3.10.6 Python, but you have {version.major}.{version.minor}.{version.micro}.
|
||||||
If you encounter an error with "RuntimeError: Couldn't install torch." message,
|
If you encounter an error with "RuntimeError: Couldn't install torch." message,
|
||||||
or any other error regarding unsuccessful package (library) installation,
|
or any other error regarding unsuccessful package (library) installation,
|
||||||
please downgrade (or upgrade) to the latest version of 3.10 Python
|
please downgrade (or upgrade) to the latest version of 3.10 Python
|
||||||
and delete current Python and "venv" folder in WebUI's directory.
|
and delete current Python and "venv" folder in WebUI's directory.
|
||||||
|
|
||||||
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3109/
|
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3109/\
|
||||||
|
""")
|
||||||
You will see this warning only once, delete file "no_py_ver_warning" file to show this warning again.
|
|
||||||
=== Warning ===
|
|
||||||
|
|
||||||
Press ENTER to continue...\
|
|
||||||
"""
|
|
||||||
except AssertionError as e:
|
|
||||||
print(e)
|
|
||||||
with open("no_py_ver_warning", "w"):
|
|
||||||
pass
|
|
||||||
input()
|
|
||||||
|
|
||||||
|
|
||||||
def commit_hash():
|
def commit_hash():
|
||||||
|
|
Loading…
Reference in New Issue