Home > other >  Is it possible to use OpenCV module in PyScript?
Is it possible to use OpenCV module in PyScript?

Time:05-12

I want to use opencv module but I can't import OpenCV. So how can I solve this problem? By the way, Pyodide supports OpenCV.

Example Code

CodePudding user response:

Have you loaded it as a module in your html?

  <py-env>
  - bokeh
  - numpy
    ....
  - OpenCV
  </py-env>

CodePudding user response:

OpenCV is not supported yet.

At this time, OpenCV requires pypi-json. Loading that package via Pyscript micropip throws a CORS error. Once that is fixed, I am not sure which other problems will surface.

This means some OpenCV dependencies must be corrected first.

  • Related