In Manjaro Wynsdey Blender 4.1.1 crashes (Python error: PyImport_AppendInittab)

Hi all,
I’ve just installed Manjaro Wynsdey in a KVM virtual machine.

Then I transferred a heavy Blender file developed on Debian Trixie with Blender 4.1.1 downloaded from the Blender site.

When I install Blender from the repositories and try to open the file, Blender crashes with these errors:

    ~/Sca/blender-4.1.1-linux-x64  blender                                                 ✔  5m 20s  
Read prefs: "/home/mirto/.config/blender/4.1/config/userpref.blend"
Read blend: "/home/mirto/h5a_02_sole-alto.blend"
Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be called after Py_Initialize()
Python runtime state: initialized

Current thread 0x0000792f34200000 (most recent call first):
  <no Python frame>

Thread 0x0000792f749fd000 (most recent call first):
  <no Python frame>

Extension modules: _freestyle, bpy.props, bpy.app.icons, bpy.app.timers, bpy.utils.units, bpy.types, mathutils.geometry, mathutils.interpolate, mathutils.noise, mathutils, idprop, _cycles (total: 12)
zsh: IOT instruction (core dumped)  blender
    ~/Sca/blender-4.1.1-linux-x64 

But If I download Blender 4.1.1 from the Blender site and open the same file it works correctly

    ~/Sca/blender-4.1.1-linux-x64  ./blender-launcher                                      ✔  1m 18s  
Read prefs: "/home/mirto/.config/blender/4.1/config/userpref.blend"
Writing userprefs: "/home/mirto/.config/blender/4.1/config/userpref.blend" ok
Info: Preferences saved

Writing userprefs: "/home/mirto/.config/blender/4.1/config/userpref.blend" ok
Info: Preferences saved

Read blend: "/home/mirto/h5a_02_sole-alto.blend"
Saved session recovery to "/tmp/quit.blend"
Writing userprefs: "/home/mirto/.config/blender/4.1/config/userpref.blend" ok
Info: Preferences saved

Blender quit
    ~/Sca/blender-4.1.1-linux-x64 

There is something I can do to use the repository version of Blender?

Looks like this is because Blender 4.1 is built against Python 3.11, but Manjaro now ships with Python 3.12 - the blender download on the site will include python 3.11 directly.

There’s recent discussion around patching Blender in the Arch package to resolve this: Blender 4.1.1 crash on creating fluid sim domain (#18) · Issues · Arch Linux / Packaging / Packages / blender · GitLab

See also: Use suggested upstream Python version (#1) · Issues · Arch Linux / Packaging / Packages / blender · GitLab, including a note of a user (recently) creating a blender-bin AUR package that pulls in its own python version

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.