def load_installed_version(self):
        installed_packages = get_installed_pypackages()
        if self.package in installed_packages:
            self.version = "=={}".format(
                installed_packages[self.package].version)
def setup_run_environment(self, env):
        bashrc = self.prefix.etc.bashrc
        try:
            env.extend(EnvironmentModifications.from_sourcing_file(
                bashrc, clean=True
            ))
        except Exception as e:
            msg = 'unexpected error when sourcing OpenFOAM bashrc [{0}]'
            tty.warn(msg.format(str(e)))