Streamlit hello error. Can't access streamlit properly (mac)

Viewed 25

This is what i typed into the terminal

(python_streamlit) kaipo@Kaipos-MacBook-Pro python_streamlit % streamlit hello

This is the return i got

Traceback (most recent call last):
  File "/Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/bin/streamlit", line 5, in <module>
    from streamlit.web.cli import main
  File "/Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/streamlit/__init__.py", line 48, in <module>
    from streamlit.proto.RootContainer_pb2 import RootContainer
  File "/Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/streamlit/proto/RootContainer_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: dlopen(/Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so, 2): Symbol not found: __ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_
  Referenced from: /Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so
  Expected in: flat namespace
 in /Users/kaipo/.local/share/virtualenvs/python_streamlit-XyirRlP5/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so

I have already done

pipenv shell

to use the new streamlit environment

It is also at the newest update and the Pipfile and Pipfile.lock is in my folder. I'm also on macOS.

Would appreciate any ideas on this thanks guys :)

1 Answers

It seems that your protobuf version is not compatible. Try installing this version:

protobuf = ">=3.6.0, !=3.11"
Related