Difficulty:
- After installing tensorflow using virtualenv, we cannot install opencv in the same virtual environment using:
pip3 install python3-opencv
will result in command not found
then I searched pypip.com for wheel for opencv with aarch64, result in a github link with self -compiling opencv3.
github.com/huzz/OpenCV-aarch64.git
- python will automatically set to python 2.7, then I found this link:
stackoverflow.com/questions/37070304/how-to-build-opencv-for-python3-when-both-python2-and-python3-are-installed
( you need to add more -D xxx suffix to the cmake command)
Note: if installed it in virtual environment, then the path for (which python) should be the virtual python path! (I think)
install tensorflow on rpi4 flowed a post that I marked. If the wheel file is damaged, go to their source website and do wget to get the wheel.
Also, if it showed 32 64 bit error or version cannot find/ version do not support error. Go to their website find another wheel, which is supported.