RASBERRY PI  install opencv_python

install opencv_python

安裝 opencv 用了好多指令都沒辦法順利安裝

pip3 install opencv_python

這個指令因該是直接到官網去安裝最新版本

最新版的釋出是3天前,不知道是不是不穩定,一直卡在一個地方

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://www.piwheels.org/simple
Collecting opencv-python==4.5.4.58
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b6/82/0519fdbbcaddc0fa8c2568327a8311477315a91b4513738ee1d35f0ce715/opencv-python-4.5.4.58.tar.gz (89.8 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Requirement already satisfied: numpy>=1.14.5 in /usr/lib/python3/dist-packages (from opencv-python==4.5.4.58) (1.16.2)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml) … \

停在上面那個畫面停了一天…UPGRADE也做了…還是一樣

python3 -m pip install –upgrade –force-reinstall pip

python -m pip install –upgrade pip. 都沒效…….

所以只好指定舊版本

pip install opencv-python==3.4.2.16或

pip install opencv-python==4.4.0.44

總算成功了