aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--launch.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/launch.py b/launch.py
index 9d6f4a8c..e39c68e7 100644
--- a/launch.py
+++ b/launch.py
@@ -17,6 +17,21 @@ stored_commit_hash = None
skip_install = False
+def check_python_version():
+ version = sys.version_info
+ version_range = None
+ if os.name == "nt":
+ version_range = range(7 + 1, 10 + 1)
+ else:
+ version_range = range(7 + 1, 11 + 1)
+
+ try:
+ assert version.major == 3 and version.minor in version_range, "Unsupported Python version, please use Python 3.10.x instead. You can download latest release as of 25th January (3.10.9) from here: https://www.python.org/downloads/release/python-3109/. Please, make sure to first delete current version of Python first and delete `venv` folder inside of WebUI's folder, too."
+ except AssertionError as e:
+ print(e)
+ sys.exit(-1)
+
+
def commit_hash():
global stored_commit_hash
@@ -321,5 +336,6 @@ def start():
if __name__ == "__main__":
+ check_python_version()
prepare_environment()
start()