when I create an executable of below python application which has bpy (python API for Blender) with pyinstaller on windows platform, The .exe file does'nt run. But the same program runs from Eclipse IDE.
import bpy def test_bpy(): blend_file_path = "Square.blend" blend_out_path = "Altered_square.blend" bpy.ops.wm.open_mainfile(filepath = blend_file_path) bpy.ops.mesh.primitive_cube_add(location = (0, 4, 0)) bpy.ops.wm.save_mainfile(filepath = blend_out_path, check_existing=True, filter_blender=True) if __name__ == '__main__': test_bpy()
The errors thrown are:
and also this