From d30c25010c115f2849b611012048f0899280bcc3 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 14 Jul 2026 12:18:00 +0500 Subject: [PATCH] dev_environment.py: detect Python 3.13 on any Blender 5.1+ --- src/bonsai/scripts/dev_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bonsai/scripts/dev_environment.py b/src/bonsai/scripts/dev_environment.py index fe6f46faca..8fe8464705 100755 --- a/src/bonsai/scripts/dev_environment.py +++ b/src/bonsai/scripts/dev_environment.py @@ -79,7 +79,8 @@ BONSAI_PATH = find_bonsai_path() # --------------------------- # Never changed by user. -PYTHON_VERSION = "3.13" if BLENDER_VERSION == "5.1" else "3.11" +BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) +PYTHON_VERSION = "3.13" if BLENDER_VERSION_INT >= (5, 1) else "3.11" PACKAGE_PATH = BLENDER_PATH / rf"extensions/.local/lib/python{PYTHON_VERSION}/site-packages"