code: def install(self, address, target_dir, select=[], fname=None):
      
  
      if not os.path.isdir(target_dir):
          raise DvcException(
              "target directory '{}' does not exist".format(target_dir)
          )
  
      curr_dir = os.path.realpath(os.curdir)
      if not os.path.realpath(target_dir).startswith(curr_dir):
          raise DvcException(
              "the current directory should be a subdirectory of the target "
              "dir '{}'".format(target_dir)
          )
  
      addresses = [address] if address else PackageManager.read_packages()
      for addr in addresses:
          mgr = PackageManager.get_package(addr)
          mgr.install_or_update(self, address, target_dir, select, fname)
docs: Install package.
  
      The command can be run only from DVC project root.
  
      E.g.
            Having: DVC package in https://github.com/dmpetrov/tag_classifier
  
            $ dvc pkg install https://github.com/dmpetrov/tag_classifier
  
            Result: tag_classifier package in dvc_mod/ directory