Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

"NameError: name 'trimesh' is not defined" on M3 Mac

Open zixinz990 opened this issue 10 months ago • 13 comments

Tried several examples, but kept getting this error. For examples, when I ran Beyond Rigid Bodies, I got:

objc[3175]: Class GLFWHelper is implemented in both /opt/homebrew/lib/python3.12/site-packages/taichi/_lib/core/taichi_python.cpython-312-darwin.so (0x147e08570) and /opt/homebrew/lib/python3.12/site-packages/pygel3d/libPyGEL.dylib (0x17ec6d7c0). One of the two will be used. Which one is undefined.
objc[3175]: Class GLFWApplicationDelegate is implemented in both /opt/homebrew/lib/python3.12/site-packages/taichi/_lib/core/taichi_python.cpython-312-darwin.so (0x147e085c0) and /opt/homebrew/lib/python3.12/site-packages/pygel3d/libPyGEL.dylib (0x17ec6d810). One of the two will be used. Which one is undefined.
objc[3175]: Class GLFWWindowDelegate is implemented in both /opt/homebrew/lib/python3.12/site-packages/taichi/_lib/core/taichi_python.cpython-312-darwin.so (0x147e085e8) and /opt/homebrew/lib/python3.12/site-packages/pygel3d/libPyGEL.dylib (0x17ec6d838). One of the two will be used. Which one is undefined.
objc[3175]: Class GLFWContentView is implemented in both /opt/homebrew/lib/python3.12/site-packages/taichi/_lib/core/taichi_python.cpython-312-darwin.so (0x147e08638) and /opt/homebrew/lib/python3.12/site-packages/pygel3d/libPyGEL.dylib (0x17ec6d888). One of the two will be used. Which one is undefined.
objc[3175]: Class GLFWWindow is implemented in both /opt/homebrew/lib/python3.12/site-packages/taichi/_lib/core/taichi_python.cpython-312-darwin.so (0x147e086b0) and /opt/homebrew/lib/python3.12/site-packages/pygel3d/libPyGEL.dylib (0x17ec6d900). One of the two will be used. Which one is undefined.
Failed to import pyrender. Rendering will not work.
[Genesis] [11:13:27] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [11:13:27] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [11:13:27] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [11:13:28] [INFO] Running on [Apple M3] with backend gs.metal. Device memory: 16.00 GB.
[Genesis] [11:13:28] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
Traceback (most recent call last):
  File "/Users/zixinzhang/Documents/genesis_test.py", line 8, in <module>
    scene = gs.Scene(
            ^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/genesis/utils/misc.py", line 27, in new_init
    original_init(self, *args, **kwargs)
  File "/opt/homebrew/lib/python3.12/site-packages/genesis/engine/scene.py", line 148, in __init__
    self._visualizer = Visualizer(
                       ^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/genesis/vis/visualizer.py", line 26, in __init__
    self._context = RasterizerContext(vis_options)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/genesis/vis/rasterizer_context.py", line 37, in __init__
    self.init_meshes()
  File "/opt/homebrew/lib/python3.12/site-packages/genesis/vis/rasterizer_context.py", line 52, in init_meshes
    self.link_frame_mesh = trimesh.creation.axis(origin_size=0.03, axis_radius=0.025, axis_length=1.0)
                           ^^^^^^^
NameError: name 'trimesh' is not defined

I am sure trimesh has been installed in my Python environment.

zixinz990 avatar Dec 19 '24 18:12 zixinz990