facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.45k stars 404 forks source link

ImportError: cannot import name 'text' from 'magnum' #2409

Closed chenhaomingbob closed 3 weeks ago

chenhaomingbob commented 3 weeks ago

Habitat-Sim version

v0.3.1

🐛 Bug

Traceback (most recent call last):
  File "/home/ubuntu/hdd2/chm/habitat-sim/examples/viewer.py", line 19, in <module>
    from magnum import shaders, text
ImportError: cannot import name 'text' from 'magnum' (/home/chm/miniconda3/envs/habitat/lib/python3.9/site-packages/magnum/__init__.py)

Steps to Reproduce

Steps to reproduce the behavior:

  1. conda create -n habitat python=3.9 cmake=3.14.0
  2. conda activate habitat
  3. conda install habitat-sim withbullet headless -c conda-forge -c aihabitat-nightly
  4. python -m habitat_sim.utils.datasets_download --uids habitat_test_scenes --data-path /home/ubuntu/hdd2/chm/habitat-data
  5. wget https://codeload.github.com/facebookresearch/habitat-sim/tar.gz/refs/tags/v0.3.1 -O habitat-sim-0.3.1.tar.gz
  6. tar -xvf habitat-sim-0.3.1.tar.gz
  7. cd habitat-sim-0.3.1
  8. python examples/viewer.py --scene /home/ubuntu/hdd2/chm/habitat-data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

Expected behavior

Additional context

System Info

Ubuntu18.04

ENVIRONMENT INFO: Platform: Linux-4.15.0-109-generic-x86_64-with-glibc2.27 Machine: x86_64 Processor: x86_64 Libc version: glibc 2.27 Mac version: Python version: 3.9.19 Architecture: 64bit ELF Win version: System OS: Linux Release: 4.15.0-109-generic Version: #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 Operational System: linux GCC version: b'gcc (GCC) 12.2.0\n' CMAKE version: b'cmake version 3.14.0\n'

0mdc commented 3 weeks ago

As discussed here, the headless package is meant to be run without a display. Therefore, it strips away dependencies like GUI text.

This is resolved by using another build than headless.