Skip to content

Commit d47533b

Browse files
CI : Set PYTHONHOME on macOS
Without specifically defining `PYTHONHOME`, Python 3.11 reports `Could not find platform dependent libraries <exec_prefix>` and then fails to `import math` etc. It looks like we're running into a similar issue as the one reported here: python/cpython#95400
1 parent 549f93b commit d47533b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/main/options.posix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ ENV_VARS_TO_IMPORT = "PATH CI"
6363

6464
if platform.system() == "Darwin" :
6565
os.environ["DYLD_FRAMEWORK_PATH"] = libs
66-
ENV_VARS_TO_IMPORT += " DYLD_FRAMEWORK_PATH"
66+
os.environ["PYTHONHOME"] = libs + "/Python.framework/Versions/" + pythonABIVersion
67+
ENV_VARS_TO_IMPORT += " DYLD_FRAMEWORK_PATH PYTHONHOME"

0 commit comments

Comments
 (0)