Skip to content

ModuleNotFoundError: The module 'opencv-python' is included in the Pyodide distribution, but it is not installed. #134

@mertaksoy

Description

@mertaksoy

Generation is failing for iPhone 15 with the message:

Get error while generating preview image Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
    await CodeRunner(
  File "/lib/python311.zip/_pyodide/_base.py", line 365, in run_async
    await coroutine
  File "<exec>", line 2, in <module>
  File "/home/pyodide/mockup/__init__.py", line 1, in <module>
    from .mockup_generator import MockupGenerator  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pyodide/mockup/mockup_generator.py", line 6, in <module>
    from mockup.image_generator import ImageGenerator as IG
  File "/home/pyodide/mockup/image_generator.py", line 4, in <module>
    import cv2
ModuleNotFoundError: The module 'opencv-python' is included in the Pyodide distribution, but it is not installed.
You can install it by calling:
  await micropip.install("opencv-python") in Python, or
  await pyodide.loadPackage("opencv-python") in JavaScript
See https://pyodide.org/en/stable/usage/loading-packages.html for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions