Assigned
Status Update
Comments
sl...@gmail.com <sl...@gmail.com> #2
Sorry I meant 'cloud function'
va...@google.com <va...@google.com>
ku...@google.com <ku...@google.com>
at...@promaxo.com <at...@promaxo.com> #3
I am having same issue with import vtk library on cloud functions above python 3.9 versions.
Adding libgl1-mesa-dev package on ubuntu 22 runtime image might work,
as on ubuntu18 (probably used for python3.8 and prior verisons) with libgl packages present, the issue is not present.
Adding libgl1-mesa-dev package on ubuntu 22 runtime image might work,
as on ubuntu18 (probably used for python3.8 and prior verisons) with libgl packages present, the issue is not present.
Description
if you try to import cv2 in a cloud instance (after installing opencv or opencv-python-headless, you will get the following error :
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
.There are numerous related questions on StackOverflow about this, but I found this site to sum the issue up nicely:https://itsmycode.com/importerror-libgl-so-1-cannot-open-shared-object-file-no-such-file-or-directory/
I can run the same code within a 3.8 cloud function without issue. I recall trying 3.9, but I can't be sure. I just know that the system packages needed for OpenCV don't appear to be present in Python 3.10 instances.