ImportError with Streamlit Sharing

OH UHHH system Akismet is trying to hide my topic continuously when I edit it…

Hi, everyone!
I’m a machine learning beginner, studying with Python.
Recently, I got a problem with Streamlit Sharing to share my website of my ‘tiny’ team project.
It works well on local, but couldn’t share even if I wrote a requirement.txt on my github repository.
It has an ImportError, and I think it might be related to the problem of overlapping modules.

Here’s my github repository to share my website,

And it has some error messages-the administrator will be able to check the error message on my deleted topic-, but now it stays in loading and cannot even be implemented at all.
Can you guys help me with great mercy?

I hope this topic stays this time…please.

Hi @yangchangnaihoby, welcome to the Streamlit community! :wave:

Please read through the following doc about installing OpenCV and its dependencies:

ImportError libGL.so.1 cannot open shared object file No such file or directory - Streamlit Docs

If OpenCV is an optional dependency, include opencv-python-headless in requirements.txt.

If opencv-python is a required dependency, then include:

  • opencv-python in requirements.txt and
  • libgl1 in packages.txt

Note: Don’t include more than 1 opencv variant in your requirements. Depending on the above cases, it should be either opencv-python OR opencv-python-headless; not both.

1 Like

THANKS A LOT!!!
IT WORKED!!

I included opencv-python, opencv-python-headless in requirements.txt
and libgl1 in packages.txt by your advice!

Have a nice day!

1 Like

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