In my Blender installation I have an addon registered, but when I ship my entire Blender folder to another developer (installed into a different path) it appears that the addon is not registered.

Perhaps addon registry records my full path and this is why my friend doesn't have it registered?

Is there a way to programatically register an addon in Python? Alternatively, can the --addon command line switch register?

  • 1
    $\begingroup$ Found the answer! bpy.ops.wm.addon_enable(module='<name of addon>') $\endgroup$
    – Jeepster
    Feb 10, 2014 at 20:05

2 Answers 2


Whether an addon is enabled or not, is stored in the local userpref.blend file. It is a user setting. It is not supposed to be carried around with individual .blend files (and may be seen as security issue if violated).

You find the preferences .blend in your user folder, on Windows %appdata%\Blender Foundation\Blender\2.69\config\userpref.blend (replace 2.69 by your current version number). If you use a portable Blender, then it's located in Blender\2.69\config\userpref.blend (with the Blender executable in Blender\).

If you wanna let a friend try your addon, send him the single .py file, or zip the python module and let him install it via File > User Preferences > Addons > Install from file... (he/she may enable it and save user settings to enable it by default).


To answer the specific question, I think you're looking for this: https://www.blender.org/api/blender_python_api_2_57_release/bpy.ops.wm.html#bpy.ops.wm.addon_enable

For example:

import bpy

Regarding the part of your posting where you say "when I ship my entire Blender folder to another developer" .. I suggest you make your solution turn-key and provide an install script that points blender to your .py file and registers needed addons. Maybe something along the lines of:

#!/usr/bin/env bash
blender --background --python /path/to/addon-installer.py
echo "Done"
  • $\begingroup$ This is not helpful for installing addons, please refer to this answer: blender.stackexchange.com/questions/73759/… $\endgroup$
    – Ahmed Ali
    Feb 11, 2020 at 15:45
  • $\begingroup$ Actually it is if one would take the time to follow the link ... however I went ahead and added a code example from my referenced link so its more complete. $\endgroup$
    – Michael M
    Feb 18, 2020 at 1:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .