diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index b2310629ef5..333ec997fde 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -406,8 +406,12 @@ PluginManager::PluginManager(EnergyPlusData &state) { #if LINK_WITH_PYTHON == 1 // we'll need the program directory for a few things so get it once here at the top and sanitize it - fs::path programPath = FileSystem::getAbsolutePath(FileSystem::getProgramPath()); - fs::path programDir = FileSystem::getParentDirectoryPath(programPath); + fs::path programDir; + if (state.dataGlobal->installRootOverride) { + programDir = state.dataStrGlobals->exeDirectoryPath; + } else { + programDir = FileSystem::getParentDirectoryPath(FileSystem::getAbsolutePath(FileSystem::getProgramPath())); + } fs::path sanitizedProgramDir = PluginManager::sanitizedPath(programDir); // I think we need to set the python path before initializing the library