Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to include OpenCV when building Flask app from Github using App Platform?
I have tried to build my Flask app from my Github repository using the App Platform UI.
I have managed to build the app, as indicated by the build logs, but I am unable to deploy the app, and the deployment log kept on throwing this particular error:
- ImportError: libGL.so.1: cannot open shared object file: No such file or directory
I have tried changing the dependency from opencv-python to opencv-python-headless, but to no avail, and after some simple search online, I found that OpenCV is not supported by heroku-python-buildpack, which is the default buildpack used by App Platform to build the app.
I am wondering what are the steps which I can take, or files which I have to add to my Github repository, in order for App Platform to be able to compile OpenCV for use with my Flask app.
Any form of help will be appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×