Any one can help me.?

Error installing requirements.

Click “Manage App” and consult the terminal for more details.

If you still have questions, leave a message in our forums and we will get back to you ASAP.

[04:33:42] ❗️ We have encountered an unexpected problem. If this issue persists, please contact support
2024-01-08 04:34:45.283 Uncaught app exception
Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/backup-code/pyfile.py", line 3, in <module>
    from mylib import home, fe_LEDs, fe_LIPs
  File "/mount/src/backup-code/mylib/fe_LEDs.py", line 3, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

Hi @firstime09

The ModuleNotFoundError suggests that you’re missing a required prerequisite library. Could you try adding opencv-python-headless to your requirements.txt file.

Also see this related forum post Getting No module cv2 found - #2 by jgieseler

Hope this helps!

Sometimes the package opencv-python-headless is giving errors with python 3.9 version in the streamlit cloud @dataprofessor. Instead of that use
opencv-python-contrib-headless.

Hi @dataprofessor

Thank you for your response about that.
I will try your advice, by the way, I know you from YouTube videos, and some of your videos about Streamlit it is really helpful for me.

2 Likes

I have a new problem after trying suggestions.

2024-01-09 11:08:58.565 Uncaught app exception
Traceback (most recent call last):
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 534, in _run_script
exec(code, module.dict)
File “/mount/src/pyweb/streamlit_app.py”, line 3, in
from app import home, fe_LEDs
File “/mount/src/pyweb/app/fe_LEDs.py”, line 3, in
import cv2
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2024-01-09 11:08:58.674 503 GET /script-health-check (10.12.180.109) 111.78ms

ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2024-01-09 11:12:28.678 503 GET /script-health-check (10.12.180.109) 123.44ms
[11:12:33] :exclamation: We have encountered an unexpected problem. If this issue persists, please contact support

1 Like

Hi @firstime09

There’s actually a similar post on the error

please find the post at the following link

In a nutshell, this would entail adding prerequisite libraries to your requirements.txt file.

Hope this helps!

Thank you so much for your help @dataprofessor @djshan1979, now my simple Streamlit web app fftampinongkol.streamlit.app is all ready to be used.
And I hope you can give me some input for the next development.

1 Like

Glad to hear that it worked out!

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