I am trying to run streamlit under Ubuntu and get the following error:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/streamlit", line 5, in <module>
from streamlit.cli import main
File "/home/ubuntu/.local/lib/python3.8/site-packages/streamlit/__init__.py", line 48, in <module>
from streamlit.proto.RootContainer_pb2 import RootContainer
File "/home/ubuntu/.local/lib/python3.8/site-packages/streamlit/proto/RootContainer_pb2.py", line 33, in <module>
File "/home/ubuntu/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in __new__
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated wi th protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and wil l be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
I am running into the same problem. According to google doc, there is a need to set an environment variable to make it work.
but there seems to be no place where i can set it.
I have been running in a clean environment , inside a venv.
the issue is when i need to install
for the google-cloud-languge, this is not the newest version but the first one that has a new feature i need. This version also creates a conflict between the 3 when it comes to the protobuf version dependency
Do you have plans to upgrade to work with newer versions of protobuf?
this is also an open issue on github that seems to get a lot of requests:
I have been working on this as had the same problem. In my case the app uses tensorflow and then there are even more constraints. Finally and after testing a few versions came up with one that works (pure luck), This is what I use and the app works fine in local Docker and also in Cloud Run.
These are the packages that I’m having problems with more specifically. The versions above have already been downgraded, and still no luck.
The conflict is caused by:
The user requested protobuf==3.20.1
google-api-core 2.10.0 depends on protobuf<5.0.0dev and >=3.20.1
google-cloud-secret-manager 2.12.4 depends on protobuf<5.0.0dev and >=3.19.0
googleapis-common-protos 1.58.0 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.19.5
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.