class_docstr: LocalModuleManager is used to manage PaddleHub's local Module, which supports the installation, uninstallation,
  and search of HubModule. LocalModuleManager is a singleton object related to the path, in other words, when the
  LocalModuleManager object of the same home directory is generated multiple times, the same object is returned.
  
  Args:
      home (str): The directory where PaddleHub modules are stored, the default is ~/.paddlehub/modules
class_docstr_tok: ["LocalModuleManager","is","used","to","manage","PaddleHub","'s","local","Module",",","which","supports","the","installation",",","uninstallation",",","and","search","of","HubModule",".","LocalModuleManager","is","a","singleton","object","related","to","the","path",",","in","other","words",",","when","the","LocalModuleManager","object","of","the","same","home","directory","is","generated","multiple","times",",","the","same","object","is","returned",".","Args",":","home","(","str",")",":","The","directory","where","PaddleHub","modules","are","stored",",","the","default","is","~\/.paddlehub\/modules"]
docstr: Install a HubModule from name or directory or archive file or url. When installing with the name parameter, if a
  module that meets the conditions (both name and version) already installed, the installation step will be skipped.
  When installing with other parameter, The locally installed modules will be uninstalled.
  
  Args:
      name                (str|optional): module name to install
      directory           (str|optional): directory containing  module code
      archive             (str|optional): archive file containing  module code
      url                 (str|optional): url points to a archive file containing module code
      version             (str|optional): module version, use with name parameter
      source              (str|optional): source containing module code, use with name paramete
      ignore_env_mismatch (str|optional): Whether to ignore the environment mismatch when installing the Module.
docstr_tok: ["Install","a","HubModule","from","name","or","directory","or","archive","file","or","url",".","When","installing","with","the","name","parameter",",","if","a","module","that","meets","the","conditions","(","both","name","and","version",")","already","installed",",","the","installation","step","will","be","skipped",".","When","installing","with","other","parameter",",","The","locally","installed","modules","will","be","uninstalled",".","Args",":","name","(","str|optional",")",":","module","name","to","install","directory","(","str|optional",")",":","directory","containing","module","code","archive","(","str|optional",")",":","archive","file","containing","module","code","url","(","str|optional",")",":","url","points","to","a","archive","file","containing","module","code","version","(","str|optional",")",":","module","version",",","use","with","name","parameter","source","(","str|optional",")",":","source","containing","module","code",",","use","with","name","paramete","ignore_env_mismatch","(","str|optional",")",":","Whether","to","ignore","the","environment","mismatch","when","installing","the","Module","."]
code: def install(
      self,
      *,
      name: str = None,
      directory: str = None,
      archive: str = None,
      url: str = None,
      version: str = None,
      source: str = None,
      update: bool = False,
      branch: str = None,
      ignore_env_mismatch: bool = False,
  ) -> HubModule:
      """
      Install a HubModule from name or directory or archive file or url. When installing with the name parameter, if a
      module that meets the conditions (both name and version) already installed, the installation step will be skipped.
      When installing with other parameter, The locally installed modules will be uninstalled.
  
      Args:
          name                (str|optional): module name to install
          directory           (str|optional): directory containing  module code
          archive             (str|optional): archive file containing  module code
          url                 (str|optional): url points to a archive file containing module code
          version             (str|optional): module version, use with name parameter
          source              (str|optional): source containing module code, use with name paramete
          ignore_env_mismatch (str|optional): Whether to ignore the environment mismatch when installing the Module.
      """
      if name:
          lock = filelock.FileLock(os.path.join(TMP_HOME, name))
          with lock:
              hub_module_cls = self.search(name, source, branch)
              if hub_module_cls and hub_module_cls.version.match(
                  version
              ):
                  directory = self._get_normalized_path(
                      hub_module_cls.name
                  )
                  if version:
                      msg = (
                          "Module {}-{} already installed in {}".format(
                              hub_module_cls.name,
                              hub_module_cls.version,
                              directory,
                          )
                      )
                  else:
                      msg = "Module {} already installed in {}".format(
                          hub_module_cls.name, directory
                      )
                  log.logger.info(msg)
                  return hub_module_cls
              if source:
                  return self._install_from_source(
                      name, version, source, update, branch
                  )
              return self._install_from_name(
                  name, version, ignore_env_mismatch
              )
      elif directory:
          return self._install_from_directory(directory)
      elif archive:
          return self._install_from_archive(archive)
      elif url:
          return self._install_from_url(url)
      else:
          raise RuntimeError(
              "Attempt to install a module, but no parameters were specified."
          )
  
imports: import os
  import shutil
  import sys
  from collections import OrderedDict
  from typing import List
  import filelock
  from paddlehub.env import MODULE_HOME, TMP_HOME
  from paddlehub.module.module import Module
  from paddlehub.server import module_server
  from paddlehub.utils import xarfile, log, utils, pypi
label_desc: Use image node_id 5 for calling the LocalModuleManager obj's underlying member method code with example usage: obj.install() and returns: self, self, hub_module_cls, self, self, self