diff --git a/extern/pybind11 b/extern/pybind11 index 80dc998efc..5b0a6fc201 160000 --- a/extern/pybind11 +++ b/extern/pybind11 @@ -1 +1 @@ -Subproject commit 80dc998efced8ceb2be59756668a7e90e8bef917 +Subproject commit 5b0a6fc2017fcc176545afe3e09c9f9885283242 diff --git a/include/utilities/python/InterpreterUtil.hpp b/include/utilities/python/InterpreterUtil.hpp index b3f6cc764b..de4c0a6dd4 100644 --- a/include/utilities/python/InterpreterUtil.hpp +++ b/include/utilities/python/InterpreterUtil.hpp @@ -146,7 +146,11 @@ namespace utils { py::object requestedDirPath = Path(directoryPath); if (py::bool_(requestedDirPath.attr("is_dir")())) { if (std::find(sys_path_vector.begin(), sys_path_vector.end(), directoryPath) == sys_path_vector.end()) { +#ifdef __APPLE__ + sys_path.attr("insert")(1, py::str(directoryPath)); +#else sys_path.attr("insert")(sys_path_vector.size(), py::str(directoryPath)); +#endif } } else {