We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 004fe65 commit becce74Copy full SHA for becce74
.ci/scripts/utils.sh
@@ -50,16 +50,7 @@ dedupe_macos_loader_path_rpaths() {
50
fi
51
52
local torch_lib_dir
53
- torch_lib_dir=$(python - <<'PY'
54
-import os
55
-try:
56
- import torch
57
-except Exception:
58
- raise SystemExit(0)
59
-
60
-print(os.path.join(os.path.dirname(torch.__file__), "lib"))
61
-PY
62
-)
+ torch_lib_dir=$(python -c "import importlib.util; print(importlib.util.find_spec('torch').submodule_search_locations[0])")/lib
63
64
if [[ -z "${torch_lib_dir}" || ! -d "${torch_lib_dir}" ]]; then
65
return
0 commit comments