From 2173a562be2844eafab62601af68c2179e9eedd7 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 6 Oct 2025 14:14:49 +1100 Subject: [PATCH] Fix #7157. Don't fail if the bin dir isn't where we expect it (maybe it's packaged differently) Honestly someone with motivation and coffee needs to take a long hard look at our packaging and see if we can do a better job. --- src/bonsai/bonsai/tool/blender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bonsai/bonsai/tool/blender.py b/src/bonsai/bonsai/tool/blender.py index 90db088f9c..b9b3ae0d49 100644 --- a/src/bonsai/bonsai/tool/blender.py +++ b/src/bonsai/bonsai/tool/blender.py @@ -477,6 +477,8 @@ class Blender(bonsai.core.tool.Blender): def ensure_bin_in_path(cls) -> None: """Check 'bin' folder is in PATH, if not add for this session""" bin_dir = str(Path(__file__).parent.parent.resolve() / "libs" / "bin") + if not os.path.isdir(bin_dir): + return # Maybe the user is using a system-wide Python package. See #7157. current_path = os.environ["PATH"] if bin_dir not in current_path: os.environ["PATH"] = current_path + os.pathsep + bin_dir