-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Bug]: can't import cv2 #23031
Comments
It seems to be the Android OS issue specific to the device. Please try to export the variable first |
tried that and printed this when importing cv2:
no idea why that happens, idk how to locate this one, I'm probably never going to pkg upgrade again lol |
here more info
weird that through the command line calling python and importing cv2 works fine |
forgot to say im running another python script through a subprocess, how can I fix that? was working fine before |
I can't reproduce it on my device. It is well-known that on some devices the android linker doesn't resolve symbols correctly. |
that didn't help unfortunately, here my code which has this problem https://github.com/Ar57m/another_fractal_generator/tree/server |
You could try appending lzma in LD_PRELOAD. liblzma.so have the Xzs_Construct symbol.
|
error changed to
|
Try not setting |
I think I may have found the problem, my main script server.py was importing my module tools.py, the same that I'm importing on runner.py(which runs on a subprocess on server.py), after removing it, it magically works fine again, somehow it's conflicting 🤔. Thanks everyone for the help, I think you guys can close the issue. |
I think, importing python script should not cause that kind of issue. If there is any error in python script it should be a python error. |
yeah it's odd let me give you a example code where I hit it: alpha.py
beta.py
gamma.py
|
Reproduce your issue with environment variable |
here |
I can reproduce the issue. Suspect leakage in ffmpeg Please run these commands to build a stub libmediandk.so and see if it can resolve your issue: curl -L https://android.googlesource.com/platform/frameworks/av/+/master/media/ndk/libmediandk.map.txt?format=TEXT | base64 -d > libmediandk.map.txt
for i in $(grep ';' libmediandk.map.txt | grep -vE '}|\*' | cut -d';' -f1 | awk '{ print $1 }' | sort -u); do echo "void $i() {}"; done | tee mediandk.c
cc mediandk.c -o $PREFIX/lib/libmediandk.so -shared |
nice that worked really well 🎉
|
Maybe |
Sounds good to me. I dont have better solution. |
I'm having the same problem while using a Python module.
It was working two days ago. I have no idea why. Update:
|
Revbumping opencv should resolve it. Has been done in e5f01d4. |
Thanks. It is working now. Worth of reporting. 👍 |
Problem description
Got this this error, I reinstalled termux and it persisted. Do I need to install something or is it a bug?
What steps will reproduce the bug?
import cv2 on a python script
What is the expected behavior?
import and use opencv
System information
The text was updated successfully, but these errors were encountered: