Cannot import name 'builder' from 'google.protobuf.internal

https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html
I am performing the operations here.

# From within TensorFlow/models/research/
python object_detection/builders/model_builder_tf2_test.py
Traceback (most recent call last):
  File "C:\Users\abdullah\Desktop\tf2\models\research\object_detection\builders\model_builder_tf2_test.py", line 24, in <module>
    from object_detection.builders import model_builder
  File "C:\Users\abdullah\miniconda3\envs\tensorflow\lib\site-packages\object_detection\builders\model_builder.py", line 23, in <module>
    from object_detection.builders import anchor_generator_builder
  File "C:\Users\abdullah\miniconda3\envs\tensorflow\lib\site-packages\object_detection\builders\anchor_generator_builder.py", line 26, in <module>
    from object_detection.protos import anchor_generator_pb2
  File "C:\Users\abdullah\miniconda3\envs\tensorflow\lib\site-packages\object_detection\protos\anchor_generator_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (C:\Users\abdullah\miniconda3\envs\tensorflow\lib\site-packages\google\protobuf\internal\__init__.py)

protoc --version
When I query with , the current version is libprotoc 3.20.3
How can I solve this problem

having this same error! have tried up and downgrading version of protobuf but that just causes other issues

if i install pip install protobuf==3.20 or higher

Then

python object_detection/builders/model_builder_tf2_test.py

runs with no issue however i also get these compatibility issues

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

tensorboard 2.10.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.0rc1 which is incompatible.

tensorflow 2.10.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.0rc1 which is incompatible.

Successfully installed protobuf-3.20.0rc1

How is anyone supposed to succeed in getting this to work when following the official installation with the minefield of compatibility issues

I tried many ways, but all of them cause an incompatibility problem. I’ve been dealing with these problems for days.