#About cv2

11 messages · Page 1 of 1 (latest)

karmic tinsel
#

I live to test camera on webpage but after import opencv get some error, is it possible to solve this?

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

grave dune
#

Encontraste solucion ?

atomic hazel
#

Did you solved it ?

red ferry
#

same error at the same exact import statement...any solutions ?

#

my project id is 'f003d164-25c5-4269-9ba6-540bc45bb0af' - Here is the error description : [2023-06-10 22:44:16 +0000] [1] [INFO] Listening at: http://0.0.0.0:7314 (1)
[2023-06-10 22:44:16 +0000] [1] [INFO] Using worker: sync
[2023-06-10 22:44:16 +0000] [10] [INFO] Booting worker with pid: 10
[2023-06-10 22:45:02,758] ERROR in app: Exception on /fit [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/main.py", line 17, in about
cloudinary_url = getBestFitToInput()
File "/app/virtualstaging.py", line 5, in getBestFitToInput
import cv2
File "/opt/venv/lib/python3.8/site-packages/cv2/init.py", line 181, in <module>
bootstrap()
File "/opt/venv/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/root/.nix-profile/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

limber current
red ferry
#

OMG - Great coincidence...just found a similar Stackoverflow question and was going to give it a try before shring that here :-). https://stackoverflow.com/questions/55313610/importerror-libgl-so-1-cannot-open-shared-object-file-no-such-file-or-directo

limber current
#

if you still get the same error after using the headless version then some other package is installing the non-headless version

red ferry
#

just tested it...it worked 🙂

limber current
#

awsome

red ferry
#

Thank you.