import bpy

if bpy.app.version < (2, 80, 0):
    bpy.ops.wm.addon_install(filepath='__ADDON_PATH__', overwrite=True)
    bpy.ops.wm.addon_enable(module='io_sims')
    bpy.ops.wm.save_userpref()
else:
    bpy.ops.preferences.addon_install(filepath=u'__ADDON_PATH__', overwrite=True)
    bpy.ops.preferences.addon_enable(module='io_sims')
    bpy.ops.wm.save_userpref()
