diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-28 07:21:31 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-28 07:21:31 +0000 |
commit | 7d1f2a3a495327341ef1b3238347864845799bb6 (patch) | |
tree | 884eecc63c6ef09fbada2ef9211c7b7e825fb9c3 | |
parent | 28c4c9b907fdb084a8e0c783caaeee6cc43e52b9 (diff) | |
download | stable-diffusion-webui-gfx803-7d1f2a3a495327341ef1b3238347864845799bb6.tar.gz stable-diffusion-webui-gfx803-7d1f2a3a495327341ef1b3238347864845799bb6.tar.bz2 stable-diffusion-webui-gfx803-7d1f2a3a495327341ef1b3238347864845799bb6.zip |
remove waiting for input on version mismatch warning, change supported versions
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | launch.py | 35 |
2 files changed, 12 insertions, 24 deletions
@@ -33,4 +33,3 @@ notification.mp3 /test/stdout.txt /test/stderr.txt /cache.json -no_py_ver_warning @@ -18,35 +18,24 @@ skip_install = False def check_python_version():
- if not os.path.isfile("no_py_ver_warning"):
- version = sys.version_info
- version_range = None
- if platform.system() == "Linux":
- version_range = range(7 + 1, 11 + 1)
- else:
- version_range = range(7 + 1, 10 + 1)
+ version = sys.version_info
+ if platform.system() == "Windows":
+ supported_minors = [10]
+ else:
+ supported_minors = [7, 8, 9, 10, 11]
+
+ if not (version.major == 3 and version.minor in supported_minors):
+ import modules.errors
- try:
- assert version.major == 3 and version.minor in version_range, f"""
-=== 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,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
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 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()
+You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3109/\
+""")
def commit_hash():
|