close

[Solved] AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to import label_map_util in my jupyter notebook and I am facing following error AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ Error Occurs ?

I am trying to import label_map_util in my jupyter notebook and I am facing following error.

~\AppData\Roaming\Python\Python37\site-packages\object_detection\protos\string_int_label_map_pb2.py in <module>
     19   syntax='proto2',
     20   serialized_options=None,
---> 21   create_key=_descriptor._internal_create_key,

AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'

How To Solve AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ Error ?

  1. How To Solve AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ Error ?

    To Solve AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ Simplest and easiest ever solution is to upgrade protobuf version. Just After upgraded the pip version with the problem was solved. Just run this command. pip install –upgrade protobuf If you are using python 3 then run this command. pip3 install –upgrade protobuf.

  2. AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’

    To Solve AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’ Simplest and easiest ever solution is to upgrade protobuf version. Just After upgraded the pip version with the problem was solved. Just run this command. pip install –upgrade protobuf If you are using python 3 then run this command. pip3 install –upgrade protobuf.

Solution 1: Just upgrade protobuf

Simplest and easiest ever solution is to upgrade protobuf version. Just After upgraded the pip version with the problem was solved. Just run this command.

pip install --upgrade protobuf

If you are using python 3 then run this command.

pip3 install --upgrade protobuf

Solution 2: Run these command

Just run these command to solve this error. First of all uninstall protobuf with this command.

pip uninstall protobuf python3-protobuf

Then Upgrade pip with this command.

pip install --upgrade pip

Then just run this command.

pip install --upgrade protobuf

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment