code: def install(path, capture_error=False):  # type: (str, bool) -> None
      
      cmd = '%s -m pip install -U . ' % _process.python_executable()
  
      if has_requirements(path):
          cmd += '-r requirements.txt'
  
      logger.info('Installing module with the following command:\n%s', cmd)
  
      _process.check_error(shlex.split(cmd), _errors.InstallModuleError, cwd=path, capture_error=capture_error)
docs: Install a Python module in the executing Python environment.
      Args:
          path (str):  Real path location of the Python module.
          capture_error (bool): Default false. If True, the running process captures the
              stderr, and appends it to the returned Exception message in case of errors.