ImportError: libGL.so.1: cannot open shared object file: No such file

Hi there,
The error is at GitHub - SrinadhVura/cohereapp, I have gone through all the discussions on libGL1 error. But, even though i tried adding opencv-python-headless in requirements.txt I am unable to get this error solved. I think this is because opencv-contrib-python is getting installed as an internal dependency for some other module. I am using python version 3.9, streamlit version = 1.28.2 and on windows. Thanks in advance for help.
The error message is

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Hi @Srinadh_Vura

Have you tried adding the following to a file packages.txt:

libgl1-mesa-glx

If this doesn’t work, you can try adding additional package dependencies as mentioned in a related post:

Hope this helps!

Yes, there is usually a library that enforces this dependency. Usually a library that has something to do with video/image processing. I couldn’t quickly recognize which one that might be when I skimmed the requirements file. I would therefore remove all libraries from the requirements file, that are not actually used via import statement. Otherwise this should help:

Thank you @dataprofessor. It worked. I invite you to explore the app at https://imagetale.streamlit.app

1 Like

Thank you for the solution @Franky1. It solved my problem. View the app at https://imagetale.streamlit.app

1 Like