I have problem with this


ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file

or directory

────────────────────── Traceback (most recent call last) ───────────────────────

/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru

nner/exec_code.py:129 in exec_func_with_error_handling

/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru

nner/script_runner.py:807 in code_to_exec

/mount/src/sign-language-ai/streamlit_app.py:20 in <module>

17 from collections import deque

18

19 import av

❱ 20 import cv2

21 import numpy as np

22 import requests

23 import streamlit as st

────────────────────────────────────────────────────────────────────────────────

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file

or directory

Hey there, thanks for sharing your error and welcome to the Streamlit community! :rocket: This is a common issue when deploying apps that use OpenCV (cv2) on Streamlit Community Cloud. The error ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory means a required system library is missing in the deployment environment.

To fix this, create a file named packages.txt in your repo (at the root, next to requirements.txt) and add the following line to it:

libglib2.0-0

Commit and push this file to your repo, then reboot your app. This will install the missing system dependency and should resolve the error. For more details, see the guidance in the Streamlit docs and community solutions like this one.

Sources:

omg tysm bro, you helpe me