How can I get the the user preferences path from blender, on windows system the path is %appdata%\Blender Foundation\Blender\2.74\config I want to get this path from blender using python on any system.


Using: bpy.utils.resource_path('USER')


import os
import bpy

user_path = bpy.utils.resource_path('USER')
config_path = os.path.join(user_path, "config")
  • Or on Linux:
  • On ms-windows will return:
    C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\2.74

See: bpy.utils.resource_path api docs

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.