close

[Solved] How to solve “AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key”?

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error How to solve “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 How to solve “AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key”? Error Occurs?

Today I get the following error How to solve “AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key”? in Python.

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

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

    To Solve How to solve “AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key”? Error The protoc version I got through pip show protobuf and protoc --version were different. The version in pip was a bit outdated.

Solution 1

The protoc version I got through pip show protobuf and protoc --version were different. The version in pip was a bit outdated.

After I upgraded the pip version with

pip install --upgrade protobuf

the problem was solved.

Solution 2

These three commands solved it for me:

pip uninstall protobuf python3-protobuf
pip install --upgrade pip
pip install --upgrade protobuf

Solution 3

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

Summery

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? Thank You.

Also Read

Leave a Comment