Skip to content

ImportError: dlopen(/env/lib/python3.10/site-packages/cv2/cv2.abi3.so, 0x0002): Symbol not found: _iconv #929

@Chhunneng

Description

@Chhunneng

Expected behaviour

fix this error.

Actual behaviour

Just import cv2 then it error.

Steps to reproduce

  • example code
import cv2
  • MacBook Air Apple M1
Traceback (most recent call last):
  File "check_face.py", line 1, in <module>
    import cv2
  File "env/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "env/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File ".pyenv/versions/3.10.11/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(env/lib/python3.10/site-packages/cv2/cv2.abi3.so, 0x0002): Symbol not found: _iconv
  Referenced from: <51F29614-574A-3957-B1EB-7B338150D9A1> env/lib/python3.10/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib
  Expected in:     <5FEC81F0-90A7-34F9-AFA5-27882CEBD803> /opt/local/lib/libiconv.2.dylib
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)

  • I'm using the latest version of opencv-python

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