How to install opencv-python 4.5.1-dev in Mac?

you don’t need a “dev” version.

OpenCV has releases. those are good for everything.

“dev version” means git master HEAD, and you don’t need that unless you actually work on OpenCV itself.