ImportError OpenCV libraries when deploying application via Google App

291 views
Skip to first unread message

Mike Borisov

unread,
Nov 11, 2020, 12:20:37 PM11/11/20
to Google App Engine
Hi!

I'm tried to deploy my flask+opencv (python 3.8) application via GoogleApp, but recieve strange error: 

ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error! Code: APP_CONTAINER_CRASHED
Traceback (most recent call last):
  File "app.py", line 6, in <module>
    from video_proc import *
  File "/home/vmagent/app/video_proc.py", line 1, in <module>
    import cv2
  File "/env/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory


Looks like docker container in GoogleApp havent needed library for OpenCv. 
Any ideas, how to fix it? 
Thanks

Elliott (Cloud Platform Support)

unread,
Nov 11, 2020, 3:16:06 PM11/11/20
to Google App Engine
Hello,

To move this along and to isolate the problem to other than GoogleApp, I would suggest deploying your application using the Google Cloud SDK with the command without quotes:


"gcloud components update"

Followed by (without quotes):

"gcloud app deploy"

If you are able to deploy correctly with the Google Cloud SDK, you may assume that your code and environment works as usual.

Reply all
Reply to author
Forward
0 new messages