opencv / opencv-python

Automated CI toolchain to produce precompiled opencv-python, opencv-python-headless, opencv-contrib-python and opencv-contrib-python-headless packages.
https://pypi.org/project/opencv-python/
MIT License
4.53k stars 847 forks source link

Failed to install opencv-python on termux #732

Open Miniontoby opened 2 years ago

Miniontoby commented 2 years ago

Expected behaviour

A working installation using pip install opencv-python

Actual behaviour

Failed to install at cmake

Steps to reproduce

Issue submission checklist

Possibly helpful: https://github.com/scikit-build/cmake-python-distributions/issues/223

asmorkalov commented 2 years ago

Could you bring more details, logs, etc?

Miniontoby commented 2 years ago

I would love to, but all the lines of logs are in 1 line without breaklines...

Also idk how to easily copy to my laptop or my new phone

Op di 27 sep. 2022 09:56 schreef Alexander Smorkalov < @.***>:

Could you bring more details, logs, etc?

— Reply to this email directly, view it on GitHub https://github.com/opencv/opencv-python/issues/732#issuecomment-1259126817, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNYDYBA6VL37257NW7U6BTWAKSCHANCNFSM6AAAAAAQWAIV2M . You are receiving this because you authored the thread.Message ID: @.***>

Miniontoby commented 2 years ago

The logs are the same as at this issue at the comment of "RSwarnkar"

asmorkalov commented 2 years ago

The issue is related to CMake tool, but not OpenCV. It fails to build with libarchive. At least it's what I see from logs in the related ticket. There is nothing to fix in OpenCV for now. As hack or workaround you can do the following:

Miniontoby commented 2 years ago

Can you tell me how to 'hack' opencv-python to exclude the cmake package?

I know a lot, but cannot figure this one out yet

EDIT: I think i did it, but still it failed. Here is the logs: https://termbin.com/1gm1

RealYukiSan commented 3 weeks ago

I managed to install it, but it not listed in pip list

pkg list-installed:

opencv-python/x11,now 4.10.0-2 aarch64 [installed]
opencv/x11,now 4.10.0-2 aarch64 [installed,automatic]
RealYukiSan commented 3 weeks ago

nvm, the output of pkg list-installed is false-positive, and it didn't printed on apt list --installed or pkg files opencv-python

RealYukiSan commented 3 weeks ago

after some update & upgrade and reinstall the package, somehow it now properly installed. even though it will not listed on pip list command, you can still use it. maybe the reason it didn't listed on pip because package naming convention? opencv-python instead of python-opencv make it invisible from pip? because I install python-numpy with pkg and it's listed as well on pip.