aboutsummaryrefslogtreecommitdiffstats
path: root/launch.py
diff options
context:
space:
mode:
authorSpaceginner <ivan.demian2009@gmail.com>2023-01-25 17:07:48 +0000
committerSpaceginner <ivan.demian2009@gmail.com>2023-01-25 17:07:48 +0000
commite425b9812b067073eb6edfafac689735f5391b45 (patch)
tree550afa48df2d3ae9340a9e08cbf2ad61fe2008e9 /launch.py
parent635499e8329dfd8c4c5ccca180881867f34a9f36 (diff)
downloadstable-diffusion-webui-gfx803-e425b9812b067073eb6edfafac689735f5391b45.tar.gz
stable-diffusion-webui-gfx803-e425b9812b067073eb6edfafac689735f5391b45.tar.bz2
stable-diffusion-webui-gfx803-e425b9812b067073eb6edfafac689735f5391b45.zip
Added Python version check
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/launch.py b/launch.py
index 9d6f4a8c..86b4a32b 100644
--- a/launch.py
+++ b/launch.py
@@ -17,6 +17,17 @@ 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, 11)
+ else:
+ version_range = range(7, 12)
+
+ 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/"
+
+
def commit_hash():
global stored_commit_hash
@@ -321,5 +332,6 @@ def start():
if __name__ == "__main__":
+ check_python_version()
prepare_environment()
start()