标签:pip 技术 read 保存 conda 读取 安装 book alt
conda activate 虚拟环境名称
cd balabala
pip install opencv_contrib_python-4.5.0+bbaa777-cp39-cp39-macosx_11_0_arm64.whl
4. 直接pip install 会报错
Could not build wheels for numpy which use PEP 517 and cannot be installed directly
安装whl的时候会检测有没有numpy,没有或者版本不对(要求>=1.9.13)会自动升级和安装
conda install numpy=1.9.14
pip install opencv_contrib_python-4.5.0+bbaa777-cp39-cp39-macosx_11_0_arm64.whl
6. 检查,采用imread读取一个图片。将这个代码保存为testcv.py
import cv2 as cv
img = cv.imread("pic.png")
cv.imshow("logo", img)
cv.waitKey(0)
conda activate 虚拟环境名称
python testcv.py
MacBook m1芯片的python安装arm版的opencv
标签:pip 技术 read 保存 conda 读取 安装 book alt
原文地址:https://www.cnblogs.com/Coder-Photographer/p/14320872.html