Lakeside52
Lakeside52

Reputation: 519

Error when using Streamlit and Langchain to build an online AutoGPT app

I get this error when trying to use LangChain with Streamlit to build an online AutoGPT app.

input to Terminal:

streamlit run /Users/*username*/opt/anaconda3/lib/python3.9/site-packages/ipykernel_launcher.py

returns:

Traceback (most recent call last):
  File "/Users/*username*/.pyenv/versions/3.10.6/bin/streamlit", line 5, in <module>
    from streamlit.web.cli import main
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/__init__.py", line 55, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/delta_generator.py", line 36, in <module>
    from streamlit import config, cursor, env_util, logger, runtime, type_util, util
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/cursor.py", line 18, in <module>
    from streamlit.runtime.scriptrunner import get_script_run_ctx
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/runtime/__init__.py", line 16, in <module>
    from streamlit.runtime.runtime import Runtime as Runtime
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/runtime/runtime.py", line 29, in <module>
    from streamlit.proto.BackMsg_pb2 import BackMsg
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/streamlit/proto/BackMsg_pb2.py", line 5, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: dlopen(/Users/*username*/.pyenv/versions/3.10.6/lib/python3.10/site-packages/google/protobuf/pyext/_message.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_'

If anyone can point me in the right direction it would be much appreciated !

Best, /David

Upvotes: 0

Views: 625

Answers (1)

Ricca
Ricca

Reputation: 83

Check if you have the latest version of Streamlit and Google Protocol Buffers installed. You can use the following commands to upgrade both packages:

pip install --upgrade streamlit
pip install --upgrade protobuf

If the issue persists, it might be due to a conflict between different versions of the Google Protocol Buffers library. In this case, you can try uninstalling and reinstalling the protobuf package:

pip uninstall protobuf
pip install protobuf

I had a similar problem maybe two packages are not compatible, that was my problem then. I would look if there are packages that are not compatible with each other

Best of luck =)

Upvotes: 0

Related Questions