Skip to content

Commit 8776a23

Browse files
authored
bug(fix): fix the python path
1 parent 4b94d14 commit 8776a23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

IDCBrowser/IDCHandlerModule.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ def registerCustomProtocol(self):
226226
print(f"Failed to register IDC Browser URL protocol on Windows: {e}")
227227

228228
elif platform.system() == "Darwin":
229-
slicer_exec_dir = os.path.dirname(sys.executable)
230-
231-
# Construct the path to PythonSlicer.exe in the same directory
232-
python_path = os.path.join(slicer_exec_dir, "bin", "PythonSlicer")
229+
grandparent_dir = os.path.dirname(os.path.dirname(slicer_dir))
230+
231+
# Now, you can construct the path to PythonSlicer
232+
python_path = os.path.join(grandparent_dir, "bin", "PythonSlicer")
233233

234234
current_dir = os.path.dirname(os.path.realpath(__file__))
235235
python_script_path = os.path.join(current_dir,'Resources', 'resolver.py')

0 commit comments

Comments
 (0)