Cannot import open3d.ml.torch ?
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 365
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 1
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D-ML/issues).
- [X] 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).
### My Question
Hi, when I try to import `import open3d.ml.torch`, this strange error occurs...
```python
>>> import open3d.ml.torch as ml3d
```
```bash
Traceback (most recent call last):
File "", line 1, in
File "/home/spacex/.local/lib/python3.8/site-packages/open3d/ml/torch/__init__.py", line 122, in
from . import models
File "/home/spacex/.local/lib/python3.8/site-packages/open3d/ml/torch/models.py", line 35, in
from open3d._ml3d.torch.models import *
File "/home/spacex/.local/lib/python3.8/site-packages/open3d/_ml3d/torch/__init__.py", line 1, in
from .pipelines import *
File "/home/spacex/.local/lib/python3.8/site-packages/open3d/_ml3d/torch/pipelines/__init__.py", line 3, in
from .semantic_segmentation import SemanticSegmentation
File "/home/spacex/.local/lib/python3.8/site-packages/open3d/_ml3d/torch/pipelines/semantic_segmentation.py", line 9, in
from torch.utils.tensorboard import SummaryWriter
File "/home/spacex/.local/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py", line 8, in
from .writer import FileWriter, SummaryWriter # noqa F401
File "/home/spacex/.local/lib/python3.8/site-packages/torch/utils/tensorboard/writer.py", line 10, in
from tensorboard.compat.proto.event_pb2 import SessionLog
File "/home/spacex/.local/lib/python3.8/site-packages/tensorboard/compat/proto/event_pb2.py", line 17, in
from tensorboard.compat.proto import summary_pb2 as tensorboard_dot_compat_dot_proto_dot_summary__pb2
File "/home/spacex/.local/lib/python3.8/site-packages/tensorboard/compat/proto/summary_pb2.py", line 17, in
from tensorboard.compat.proto import tensor_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__pb2
File "/home/spacex/.local/lib/python3.8/site-packages/tensorboard/compat/proto/tensor_pb2.py", line 16, in
from tensorboard.compat.proto import resource_handle_pb2 as tensorboard_dot_compat_dot_proto_dot_resource__handle__pb2
File "/home/spacex/.local/lib/python3.8/site-packages/tensorboard/compat/proto/resource_handle_pb2.py", line 16, in
from tensorboard.compat.proto import tensor_shape_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__shape__pb2
File "/home/spacex/.local/lib/python3.8/site-packages/tensorboard/compat/proto/tensor_shape_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/home/spacex/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.