Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: No module named 'numpy.core._multiarray_umath' when trying to import numpy #780

Closed
sreddy-es opened this issue Dec 29, 2022 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@sreddy-es
Copy link

Describe the bug
Get: No module named 'numpy.core._multiarray_umath' when add-on(scatter 5.3.1) tries to import numpy

General Information

  1. Which BlenderProc version are you using?
    2.5.0

  2. On which operating system are you?
    Ubuntu 20.04

  3. Have you checked the issue tracker to see if a similar issue has been opened?
    Yes, Similar issue [BUG]: Import error when importing BlenderProc #722 was due to an add-on. But removing add-on would break data-gen code.

  4. How do you know BlenderProc is the issue and not the add-on?
    Separately installed blender 3.3.0 (version required for bproc 2.5.0) and was able to successfully install and use the add-on from the GUI.

  5. Have you changed BlenderProc in any way besides the config file? If yes, are you sure that this change does not affect the problem you are having?
    No.

To Reproduce
Steps to reproduce the behavior:
Inside the virtual env

  1. Run
    pip uninstall -y blenderproc
    pip install --upgrade blenderproc
    blenderproc debug scatter_scene.py
  1. Before pressing 'Run Blenderproc'. Go to Edit->Preferences->add-ons and install scatter. (Fails in GUI and in CLI).

  2. Provide the full python file, you used:

import blenderproc as bproc
import bpy
from bpy.ops import scatter5
from blenderproc.python.utility.Utility import Utility

import os
import random
import glob
from PIL import Image
import matplotlib.pyplot as plt

import numpy as np

   def main():
          bproc.init()
      
         
          add_lights(bproc)
      
          bpy.ops.mesh.primitive_cylinder_add()
          cylinder = bproc.object.create_primitive('CYLINDER')
          cylinder.scale = (0.1, 0.1, 0.1)
          plane = bproc.object.create_primitive('PLANE')
          density_scatter_on_plane(plane, cylinder, 1)

   def density_scatter_on_plane(emitter_obj, objs_to_scatter,density_value = 100., density_scale = 'm', psy_name="DensityScatter"):
          bpy.context.scene.scatter5.emitter = bpy.data.objects[emitter_obj.get_name()]
          bpy.context.scene.scatter5.factory_event_listening_allow = False
      
          instance_name = objs_to_scatter.get_name()
          # instance_names = objs_to_scatter[0].get_name()
          # for obj in objs_to_scatter[1:]:
          #     instance_names += '_!#!_'+obj.get_name()
          scatter5.add_psy_density(emitter_name=emitter_obj.get_name(),instances_names=instance_name, 
                                  density_scale = density_scale, density_value = density_value,
                                  selection_mode = 'viewport', psy_name=psy_name)
  1. Provide a link to all 3D models you used, if they are from one of the publicly available supported datasets, provide the name or path so that it is possible to reproduce the error.

Expected behavior
Add-on should be ready to use

Additional context
The add-on was working on blenderproc 2.3.0 with a few tweaks but with the update. It doesn't with the latest Blenderproc.
I'm able to import numpy on python3.10 venv without errors.

@sreddy-es sreddy-es added the bug Something isn't working label Dec 29, 2022
@MartinSmeyer
Copy link
Member

Hey @sreddy-es,

we don't support the compatibility to any third party add-on.

That being said, I would propose you to check the numpy version of the scatter add-on and the reinstall that version with BlenderProc using

blenderproc pip install numpy==XXX

It's probably just a version conflict.

Best,
Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants