How to solve “AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key”?

前端 未结 4 1896
[愿得一人]
[愿得一人] 2020-12-15 02:49

I encountered it while executing from object_detection.utils import label_map_util in jupyter notebook. It is actually the tensorflow object detection tutorial

4条回答
  •  渐次进展
    2020-12-15 03:35

    After trying many different solutions (i'm working on a Mac) the one that worked for me is to reinstall protobuf using:

    PROTOC_ZIP=protoc-3.7.1-osx-x86_64.zip
    curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
    sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
    sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
    rm -f $PROTOC_ZIP
    

    As is highlighted in this article

提交回复
热议问题