Import cv2 issues

  1. The app link:
  2. Github: GitHub - wayyn3/fypSLR
  3. Error message: ```
    2024-01-01 14:30:13.907 Uncaught app exception

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/fypslr/”, line 2, in

import cv2

ImportError: cannot open shared object file: No such file or directory

2024-01-01 14:30:14.031 503 GET /script-health-check ( 127.36ms

4. Streamlit version: streamlit==1.28.2
python version: opencv-contrib-python==

i have tried with the opencv-python-headless and packages.txt still not working, helppp

Just use opencv-contrib-python-headless. Dont mention any version and also remove packages.txt. No need of that. Trust me it will works. Because I have deployed my application with same package which i had mentioned in my requirements.txt file

Happy Streamlit-ing :balloon:

Thanks, but I still getting the same error after trying opencv-contrib-python-headless with and without the version :face_holding_back_tears:

Once check the following GitHub repository

Once suggestion that to use python 3.10 while deploying your app.

The github repository is 404 not found. My python version is Python 3.11.7 should i download Python 3.10?

Yes. It is working with 3.10

I have uninstall my python 3.11 and using python 3.10.0 but still not work for me :disappointed_relieved:

If possible shall I deploy that one?

hii, thanks, my streamlit app finally works! I delete the deploying app and redeploy by referring to this Import cv2 error : module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' · Issue #5315 · streamlit/streamlit · GitHub .