Error in installing requirement (AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key')

I am trying to use tsai package on Streamlit Cloud, but when I install the package in requirements.txt, streamlit gets spawn error and does not load. Could you look into this error? This is the test repo that I created for this problem.

Error is as follows:
AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key’

Hi @user10, welcome to the Streamlit community!

In this case, since it’s a single package, I would specify an exact version of Streamlit in your requirements.txt file and that should resolve it. Since it’s not clear exactly what you’re doing, I would start by adding streamlit==1.2 .


I tried streamlit 1.2, .1.3, 1.4, 1.5 and 1.5.1. Everywhere the same error about protobuf.

Protobuf 3.19.4 and 3.17.3