parameters: ()
docstring: install plugin into user QGIS environment
docstring_summary: install plugin into user QGIS environment
docstring_tokens: install plugin into user QGIS environment
function: def install():
      """install plugin into user QGIS environment"""
  
      plugins_dir = path(USERDIR) / '.qgis3/python/plugins'
  
      if os.path.exists(options.base.install):
          if os.path.islink(options.base.install):
              os.unlink(options.base.install)
          else:
              shutil.rmtree(options.base.install)
  
      if not os.path.exists(plugins_dir):
          raise OSError('The directory %s does not exist.' % plugins_dir)
      if not hasattr(os, 'symlink'):
          shutil.copytree(options.base.plugin, options.base.install)
      elif not os.path.exists(options.base.install):
          os.symlink(options.base.plugin, options.base.install)
function_tokens: def install ( ) : plugins_dir = path ( USERDIR ) / '.qgis3/python/plugins' if os . path . exists ( options . base . install ) : if os . path . islink ( options . base . install ) : os . unlink ( options . base . install ) else : shutil . rmtree ( options . base . install ) if not os . path . exists ( plugins_dir ) : raise OSError ( 'The directory %s does not exist.' % plugins_dir ) if not hasattr ( os , 'symlink' ) : shutil . copytree ( options . base . plugin , options . base . install ) elif not os . path . exists ( options . base . install ) : os . symlink ( options . base . plugin , options . base . install )