Skip to content

Opencv error #13062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
knshkp opened this issue Sep 19, 2022 · 2 comments
Closed

Opencv error #13062

knshkp opened this issue Sep 19, 2022 · 2 comments
Labels
meta: stale This issue/PR is stale and will be closed soon team: workspace Issue belongs to the Workspace team type: bug Something isn't working

Comments

@knshkp
Copy link

knshkp commented Sep 19, 2022

Bug description

Yeah when i were installed opencv on gitpod and when I use it to some project by imported the cv2 so then it give me the imported error

2022-09-19 03:11:38.703 Uncaught app exception
Traceback (most recent call last):
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 556, in _run_script
exec(code, module.dict)
File "/workspace/VibeIt/music.py", line 4, in
import cv2
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/gitpod/.pyenv/versions/3.8.13/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

Steps to reproduce

Yeah am reproducing by taking all the packages of open-cv and deploy in the gitpod repo so am resolving like this may I resolve this issue

Workspace affected

https://knshkp-vibeit-w42vheg6nth.ws-us65.gitpod.io/

Expected behavior

Yeah actually am want to see it installed it correctly and am installing both the type by opencv python and opencv-contrib-python

Example repository

2022-09-19 03:11:38.703 Uncaught app exception
Traceback (most recent call last):
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 556, in _run_script
exec(code, module.dict)
File "/workspace/VibeIt/music.py", line 4, in
import cv2
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/gitpod/.pyenv/versions/3.8.13/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

Anything else?

Plss as soon as possible resolve this issue bcoz i know github is very active organisation

@knshkp knshkp added the type: bug Something isn't working label Sep 19, 2022
@axonasif
Copy link
Member

axonasif commented Sep 19, 2022

From your error logs, this is probably where it's all failing:

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

Gitpod does not provide GPUs for now. However, you might be able to workaround this by installing libgl1:

sudo apt install libgl1

Even if opencv works with it, remember that it's going to be software acceleration but not hardware, so the computation performance will be noticeably slow.

Also, I encourage you to upvote in #10650

@axonasif axonasif added the team: workspace Issue belongs to the Workspace team label Sep 19, 2022
@stale
Copy link

stale bot commented Dec 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Dec 20, 2022
@stale stale bot closed this as completed Jan 3, 2023
@github-project-automation github-project-automation bot moved this to Awaiting Deployment in 🌌 Workspace Team Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: stale This issue/PR is stale and will be closed soon team: workspace Issue belongs to the Workspace team type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants