How to compile blender add-on?

I compiled Blender as python module successfully in Windows Platform. I can now import bpy without problems from my script. Now I would like use an add-on from my script but I receive this error:

AttributeError: Calling operator "bpy.ops.importgis.georaster" error, could not be found.

Obviously, because I haven't compiled this add-on. How do I compile it?

I solved this by enabling addon: bpy.ops.wm.addon_enable(module="BlenderGIS-master")

• How did you compile Blender's bpy in the first place? – Bert VdB Nov 29 '17 at 10:34
• I compiled it with CMake in Windows 10 following this example: cobertos.com/… – Giuseppe Nov 29 '17 at 11:28
• It's not that the addon isn't compiled, it isn't enabled. Can enable addon in script using from addon_utils import enable and enable("BlenderGIS") .. could be a bit dodgy with this addon by the looks. Also checkout the code, may find a direct method via reading code, and using from BlenderGIS import ... making it possible to bypass using operator altogether. (eg see if operator just sets parameters and calls a function, and use that funciton) – batFINGER Nov 29 '17 at 13:12
• I solved this by enabling addon: bpy.ops.wm.addon_enable(module="BlenderGIS-master") – Giuseppe Nov 29 '17 at 13:50
• Nice, wasn't sure if window manager ops would work for bpy as py module. – batFINGER Nov 29 '17 at 13:56