Skip to content
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

[DOC] - Usage of opencv requires unique env build #443

Open
1 task done
kcpevey opened this issue May 1, 2024 · 0 comments
Open
1 task done

[DOC] - Usage of opencv requires unique env build #443

kcpevey opened this issue May 1, 2024 · 0 comments

Comments

@kcpevey
Copy link
Contributor

kcpevey commented May 1, 2024

Preliminary Checks

Summary

In order to use opencv on Nebari, you need some additional libraries (OpenGL) that are not packaged with opencv on conda-forge.

If you only specify opencv in your environment, you'll get an error when you try to run import cv2:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[3], line 1
----> 1 import cv2

ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

Steps to Resolve this Issue

Instead of installing opencv in your environment, you can install libopencv headless, like this:

channels:
  - conda-forge
dependencies:
  - python=3.10
  - libopencv *=headless*

We should document this process, probably as an FAQ, since we have a lot of users who are interested in opencv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 📬
Status: New 🚦
Development

No branches or pull requests

2 participants