Importing bpy in Python fails

I am on Ubuntu. Built bpy following the instructions on the wiki using prebuilt libs and the build itself succeeded. The install prefix is set to my python’s site-packages. Then in Python when I import bpy, I get this error

ImportError: /home/ataerabb/miniconda3/lib/python3.7/site-packages/ undefined symbol: UI_alert_image

What seems to be the problem?

This should be fixed now if you update to latest master:

1 Like

Deleted the build folder, did make update and then make bpy and got the following errors.

/home/ataerabb/Documents/blender-git/lib/linux_centos7_x86_64/xr_openxr_sdk/include/openxr/openxr_platform.h:117:5: error: 'Display' does not name a type
     Display*                    xDisplay;
/home/ataerabb/Documents/blender-git/lib/linux_centos7_x86_64/xr_openxr_sdk/include/openxr/openxr_platform.h:119:5: error: 'GLXFBConfig' does not name a type
     GLXFBConfig                 glxFBConfig;
/home/ataerabb/Documents/blender-git/lib/linux_centos7_x86_64/xr_openxr_sdk/include/openxr/openxr_platform.h:120:5: error: 'GLXDrawable' does not name a type
     GLXDrawable                 glxDrawable;
/home/ataerabb/Documents/blender-git/lib/linux_centos7_x86_64/xr_openxr_sdk/include/openxr/openxr_platform.h:121:5: error: 'GLXContext' does not name a type
     GLXContext                  glxContext;

So I set WITH_OPENXR to OFF and then restarted the build which succeded. Now when I do the test mentioned in the wiki (python -c "import bpy; bpy.ops.render.render(write_still=True)"), I get the following errors:

/run/user/1004/gvfs/ non-existent directory
Segmentation fault (core dumped)

Edit: It works! I still get /run/user/1004/gvfs/ non-existent directory whenever I import bpy but rendering works in a custom script I wrote.

Fixed the build errors,
The segfault with the test command should be reported.