Getting errors during import bpy after building Blendr 2.8x as Python module

I have built/compiled Blender 2.8 as Python module. When I do import bpy in a container (Singularity) in Python I get the following errors.

Failed to create secure directory (/run/user/142698/pulse): No such file or directory
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
/run/user/142698/gvfs/ non-existent directory

The first error is probably because I have compiled Blender in a container and therefore it is not possible to make any new files/directories in the container. I wonder, why is Blender trying to create that directory? Is there a way to disable what Blender is doing or change the path where Blender wants to create that directory manually?

For the other errors, can you guys tell me why I’m getting them? I thought I’m getting them because Blender is trying to use sound API so I compiled Blender with WITH_OPENAL set to OFF. Do I have to do something else as well?

Note that bpy gets imported eventually but these errors show before import is finished.

Perhaps, you also need to disable WITH_SDL to completely get rid of audio support.

1 Like

Thank you. It worked but I still get this warning: /run/user/142698/gvfs/ non-existent directory.

Does anyone know why I am getting this? What is Blender trying to do?