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

Importing opend3d fails since open3d-ml doesn't check for build_gui #637

Open
3 tasks done
ccoulombe opened this issue Jan 31, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@ccoulombe
Copy link
Contributor

Checklist

Describe the issue

When Open3D has been built without GUI support, it should still be able to import correctly.
It currently fails since there's no check if it was built or not with GUI in Open3D-ML.

Steps to reproduce the bug

# Build Open3d with `-DBUILD_GUI=OFF -DBUILD_PYTORCH_OPS=ON -DBUNDLE_OPEN3D_ML=ON -DOPEN3D_ML_ROOT=$PWD/Open3D-ML` (for cpu or gpu)

python -c 'import open3d'


### Error message

```python
>>> import open3d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/__init__.py", line 146, in <module>
    import open3d.ml
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/ml/__init__.py", line 16, in <module>
    from . import datasets
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/ml/datasets.py", line 15, in <module>
    from open3d._ml3d.datasets import *
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/datasets/__init__.py", line 3, in <module>
    from .semantickitti import SemanticKITTI
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/datasets/semantickitti.py", line 10, in <module>
    from .utils import DataProcessing
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/datasets/utils/__init__.py", line 6, in <module>
    from .bev_box import BEVBox3D
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/datasets/utils/bev_box.py", line 1, in <module>
    from ...vis import BoundingBox3D
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/vis/__init__.py", line 5, in <module>
    from .visualizer import *
  File "/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/_ml3d/vis/visualizer.py", line 6, in <module>
    from open3d.visualization import gui
ImportError: cannot import name 'gui' from 'open3d.visualization' (/home/coulombc/.envs/14710/lib/python3.11/site-packages/open3d/visualization/__init__.py)

Expected behavior

Import correctly.

>>> import open3d
>>> 

Open3D, Python and System information

- Operating system: Centos
- Python version: Any
- Open3D version: 0.18
- System type: x86
- Is this remote workstation?: yes
- How did you install Open3D?: from source
- Compiler version (if built from source): GCC 9, clang

Additional information

Partial solution in #636

@ccoulombe ccoulombe added the bug Something isn't working label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant