EDIT, SOLUTION: add the line
bpy.context.scene.render.engine = 'CYCLES'
to change the rendered to cycles, it no longer seg faults.
bpy.ops.render.render(write_still = 1)
seg faults with bpy 2.82 & 2.83 on MacOS 10.15 and python 3.7.7
python -c “import bpy; bpy.ops.render.render(write_still = 1)”
[1] 88290 segmentation fault python -c “import bpy; bpy.ops.render.render(write_still = 1)”
I am trying to render images headlessly with blender as a python module, alternatives or ideas appreciated.
Same issue reported by some one else here (they attached a stack trace) rendering - Segmentation Fault when calling bpy.ops.render.render (script using Blender as a Python Module on Mac) - Blender Stack Exchange
And probably here: Building Python Library