Skip to content

[Bug]: can't import cv2 #23031

Open
Open
@Ar57m

Description

Problem description

Got this this error, I reinstalled termux and it persisted. Do I need to install something or is it a bug?

import cv2
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()                                                 File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/cv2/__init__.py", line 153, in bootstrap                   native_module = importlib.import_module("cv2")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module                        return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                             ImportError: dlopen failed: cannot locate symbol "eglDestroySyncKHR" referenced by "/system/lib64/libgui.so"...

What steps will reproduce the bug?

import cv2 on a python script

What is the expected behavior?

import and use opencv

System information

termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=30038                                          TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1                                        TERMUX__USER_ID=0                                             Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.44.6
Android version:
13
Kernel build information:
Linux localhost 5.4.233-qgki-27101688-abM526BXXS5CXE2 #1 SMP PREEMPT Fri May 17 15:23:51 KST 2024 aarch64 Android
Device manufacturer:                                          samsung
Device model:
SM-M526B
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so

Metadata

Assignees

No one assigned

    Labels

    bug reportSomething is not working properlysystem-level bugBug is hidden somewhere in OS and can't be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions