Cannot compile on under Headless Ubuntu 18.04 and module 'open3d.visualization' has no attribute 'rendering'
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Steps to reproduce the issue
I want to render and save images from a terminal without any display device
the cmake command is the following:
cmake -DENABLE_HEADLESS_RENDERING=ON \
-DBUILD_GUI=OFF \
-DBUILD_WEBRTC=OFF \
-DUSE_SYSTEM_GLEW=OFF \
-DUSE_SYSTEM_GLFW=OFF \
..
The result of cmake is as follows:

Then, I make install-pip-package:

Finally, successfully tested the provided Python script for saving depth and surface normal sequences:
cd ~/Open3D/examples/python/visualization
python headless_rendering.py
This should print the following:
Capture image 00000
Capture image 00001
Capture image 00002
It all looks normal!
But, when i want to test own program :
render = o3d.visualization.rendering.OffscreenRenderer(width, height, headless=True)
AttributeError: module 'open3d.visualization' has no attribute 'rendering'

### Error message
```shell
render = o3d.visualization.rendering.OffscreenRenderer(width, height, headless=True)
AttributeError: module 'open3d.visualization' has no attribute 'rendering'
I don't know if the compilation is correct, if not how to fix it, thank you!
```
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 18.04
- Python version: Python 3.7
- Open3D version: output from python: `print(open3d.__version__)`
- System architecture: x86
- Is this a remote workstation?: yes
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 7.5
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.