Error in deploying cv2 app

Hello guys, I am trying to deploy my cv2 app using streamlit but i keep getting this error

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 534, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/photo-editor-with-opencv/", line 1, in <module>
    import cv2
ImportError: cannot open shared object file: No such file or directory

This is the link to my repo: GitHub - ChibuikeOnuba/Photo-editor-with-openCV
how do i fix this please

Hi @FrAmeS,

Thanks for posting!

Create a packages.txt file in your repo with the following line to install the apt-get dependency libgl:


Alternatively, change in the requirements.txt file:
opencv-python-headless instead of opencv-python


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.