diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 5fe229eae8c6c69ef408a27611d48b45cab49b98..6c4950e92020aed7acce5db681f66b2aac712317 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -200,6 +200,11 @@ ProjectData::ProjectData(BaseLib::ConfigTree const& project_config, { #ifdef OGS_USE_PYTHON namespace py = pybind11; + + // Append project's directory to python's module search path. + py::module::import("sys").attr("path").attr("append")( + project_directory); + auto const script_path = BaseLib::copyPathToFileName(*python_script, project_directory);