Page MenuHome

Exporting gltf results in numpy error, unable to load multiarray
Closed, ArchivedPublic

Description

System Information
Operating system: Ubuntu 18.04
Graphics card: NVIDIA GTX 1050, drivers 440.64

Blender Version
Broken: 2.83, sub 11
Worked: unknown

Short description of error
export as gltf results in error. numpy is unable to load multiarray.
Exact steps for others to reproduce the error

  1. open blender with new file (e.g. just a cube)
  2. Export as gltf
  3. Click Export / Save File <--- error occurs here

I've tried uninstalling numpy & reinstalling it with apt pip and conda. No change in the error. reboots dont affect.

Event Timeline

Cannot redo on rB10bd3fb4cb186f927d8839d2da28eeb90d6722f3
Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits

'Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/libextern_draco.dylib' exists, draco mesh compression is available
07:02:17 | INFO: Starting glTF 2.0 export
07:02:17 | INFO: Extracting primitive: Cube
07:02:17 | INFO: Primitives created: 1
07:02:17 | INFO: Finished glTF 2.0 export in 0.00869297981262207 s
Ankit Meel (ankitm) changed the task status from Needs Triage to Needs Information from User.EditedMar 28 2020, 8:05 AM

Please add the full error. Run ./Blender --debug-all > T75152.txt and upload the file

I apologize, i am new to blender, and relatively new to linux. Where am I executing the command from? Below is the error message.

{F8432139}Blender Info Log:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
ImportError: cannot import name 'multiarray' from 'numpy.core' (/usr/lib/python3/dist-packages/numpy/core/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/__init__.py", line 391, in execute
    from .blender.exp import gltf2_blender_export
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 22, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather.py", line 19, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_nodes
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py", line 22, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_skins.py", line 22, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_joints
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py", line 21, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_extract
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_extract.py", line 25, in <module>
    from ...io.com.gltf2_io_color_management import color_srgb_to_scene_linear
  File "/usr/share/blender/2.83/scripts/addons/io_scene_gltf2/io/com/gltf2_io_color_management.py", line 15, in <module>
    import numpy as np
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/usr/lib/python3/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python3/dist-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/lib/python3/dist-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 26, in <module>
    raise ImportError(msg)
ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray' from 'numpy.core' (/usr/lib/python3/dist-packages/numpy/core/__init__.py)


location: <unknown location>:-1
Ankit Meel (ankitm) changed the task status from Needs Information from User to Needs Triage.Mar 29 2020, 10:24 AM
Ankit Meel (ankitm) edited projects, added Import/Export, Python API; removed BF Blender.
Brecht Van Lommel (brecht) claimed this task.

It seems you are using a custom Blender build. The error happens because it is building with incompatible Python and numpy, where the numpy library was compiled against a different Python version. See for example:
https://github.com/domlysz/BlenderGIS/issues/225
https://github.com/numpy/numpy/issues/14796

We recommend following the Quick Setup with precompiled libraries for building, which should avoid the issue:
https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu

If you need to build against system libraries, this kind of configuration issue is not something we can fix in Blender.