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

Installing 2.4.9 on a R.Pi #355

Closed MattTucker22689 closed 4 years ago

MattTucker22689 commented 4 years ago

I'm trying to install OpenCV 2.4.9 on my RaspberryPi and could use some help.

Thus far, I've run...

$ git clone --recursive https://github.com/skvark/opencv-python.git
$ cd opencv-python/opencv
$ git checkout 2.4
$ cd ..
$ python setup.py bdist_wheel

But it gets hung up at the end... I keep getting,

copying _skbuild/linux-armv7l-2.7/cmake-install/share/opencv4/haarcascades/haarcascade_upperbody.xml -> _skbuild/linux-armv7l-2.7/cmake-install/cv2/data/haarcascade_upperbody.xml
Traceback (most recent call last):
  File "setup.py", line 400, in <module>
    main()
  File "setup.py", line 222, in main
    cmake_source_dir=cmake_source_dir,
  File "/home/pi/.local/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 625, in setup
    cmake_source_dir, skbuild_kw['cmake_install_dir'])
  File "setup.py", line 312, in _classify_installed_files_override
    if not found: raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2[^/]*\.so'

So when I try to find the "dist" folder and run the .whl there's nothing there...

Thoughts?

Also, here is a more detailed rundown of my experience thus far: https://stackoverflow.com/questions/62650655/python-opencv-install-older-version

skvark commented 4 years ago

2.4.9 is very, very old release and has not been never supported by the toolchain in this repository. You'll have to modify the setup.py file to make it work. The binaries are located most likely in very different places than in 3.x and 4.x.