Python crashes when rendering with Workbench or Eevee


I managed to build and use blender as a python module (Blender 2.80 with Python 3.7). However, when rendering a scene with Workbench or Eevee I get the following Python Error:

Process finished with exit code -1073741819 (0xC0000005)

Rendering with Cycles works perfectly. Rendering via Python from within blender works with all engines.

import bpy
bpy.context.scene.render.engine = 'BLENDER_WORKBENCH' #Not working
#bpy.context.scene.render.engine = 'CYCLES' #Working
bpy.context.scene.render.image_settings.file_format = "AVI_RAW"
bpy.context.scene.render.filepath = "//result.avi"

Thanks for your help!

I’m experiencing the same! Blender 2.80, python 3.7 on Ubuntu 18.04, rendering with Workbench or Eevee gives me a Segmentation Fault. Cycles works just fine.

Any help greatly appreciated :pray:t3:

Since I also just tried and successfully build blender as a python module and also came across this:
I’m wondering if there’s some documentation about what’s supposed to be possible and what’s not with the blender python module version.

For a practical solution (if this is still relevant for the OP or someone else): Saving a blend file from the python module and then launching a actual blender process works with all rendering engines, here’s an example:

import subprocess
import tempfile

def manipulate_blend(blend_file, save_result_file):
    import bpy
    scene = bpy.context.scene
    cam = scene.objects['Camera']
    cam.location[2] -= 1

def render_file(executable, blend_file, rendered_file):
    parameters = [executable, '-b', blend_file, '-o', rendered_file, '-f', '1']

def main():
    with tempfile.TemporaryFile() as tmp_file:
        filename =
        manipulate_blend("your_blend_file.blend", filename)

if __name__ == '__main__':

I recently had this issue with Blender as a Python module. The solution consisting in using Blender’s CLI is not suitable if you need to quickly render a lot of images : since it initializes Blender (~5 seconds) you don’t benefit from the rendering speed of Eevee.

I first installed the most recent Blender version (3.5) as a Python module (just follow Blender as a Python module) .

The problem occurs when copying the bin\bpy folder to my python site-packages folder.

However with the Python Wheel method, it works !

I suspect this is thanks to a recent change in Blender’s code.