Closed tedchou12 closed 1 year ago
PIP I didn't solve.
But I found out a way to download and compile. There was a ram not enough error with self compiling. This was solved by increasing the swap. The Raspberry PI 3B+ ram is 1GB, not enough for compiling.
sudo dphys-swapfile swapoff
sudo vim /etc/dphys-swapfile # swap 100MB to 2GB
then compile again:
sudo git clone https://github.com/opencv/opencv.git
sudo git clone https://github.com/opencv/opencv_contrib.git
cd opencv
sudo mkdir build
cd build
sudo cmake
sudo make -j2
sudo make install
It takes quite a while. Must be patient.
Build directory, if the hardware is not too different, may be it might work for others.
references: https://www.geeksforgeeks.org/how-to-capture-a-image-from-webcam-in-python/ https://stackoverflow.com/questions/38613316/how-to-upgrade-pip3 https://magazine.techacademy.jp/magazine/51404 note: This error originates from a subprocess, and is likely not a problem with pip. raspberry pi https://www.partitionwizard.jp/partitionmanager/python-setup-py-egg-info-failed-with-error-code-1.html https://stackoverflow.com/questions/63448467/installing-opencv-fails-because-it-cannot-find-skbuild https://qiita.com/fiftystorm36/items/1a285b5fbf99f8ac82eb https://elsammit-beginnerblg.hatenablog.com/entry/2020/09/17/075234 https://stackoverflow.com/questions/70588185/warning-the-script-pip3-8-is-installed-in-usr-local-bin-which-is-not-on-path https://qiita.com/wk_/items/8db529a6b24a955888db https://learnopencv.com/install-opencv-4-on-raspberry-pi/ https://docs.opencv.org/4.x/d2/de6/tutorial_py_setup_in_ubuntu.html https://salt22g.hatenablog.jp/entry/2020/05/08/191316 https://blog.ligun.net/2013/08/raspberry_pi_opencv/ https://stackoverflow.com/questions/48146273/install-opencv-on-raspberry-pi-raspbian https://github.com/opencv/opencv_contrib/issues/1979 https://elda27.hatenablog.com/entry/2020/01/29/225534 https://linuxhint.com/disable-gui-raspberry-pi/ https://forum.opencv.org/t/why-does-raspberry-pi-freeze-at-99-build/2207 https://askubuntu.com/questions/927854/how-do-i-increase-the-size-of-swapfile-without-removing-it-in-the-terminal https://pimylifeup.com/raspberry-pi-swap-file/
https://www.miki-ie.com/raspberry-pi/raspberry-pi-3-b-opencv-3-4-6-cv2/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D ENABLE_NEON=ON -D ENABLE_VFPV3=ON -D BUILD_TESTS=OFF -D WITH_TBB=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF ..
Until now the installation from source like you did worked for me and takes a long time for sure, BUT I wasn't able to really use OpenCV (tab completion functions). My IDE and OS showed me both, that the import is possible, but when I ran code it's without a behaviour.
Expected behaviour
Write here how did you expect the library to function. able to install
Actual behaviour
Write here what went wrong.
Steps to reproduce
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)
opencv-python