hooglspec.blogg.se

Opencv python mac m1
Opencv python mac m1














After that, I started doing the build – not the Python package, initially, but OpenCV itself with the Python bindings. Starting in the evening, I opened my laptop, connected via ssh to the M1 machine, checked that all the tools were ready and cloned the OpenCV repository.

opencv python mac m1

Using the above tools, we have all we need to set up our requirements and move on to building. Using this Ansible collection that allows you to install any GUI application from Apple store we will set up XCode which is, of course, Apple’s recommended IDE. That said, having a compiler isn’t enough, we need an IDE.

opencv python mac m1

Let’s not forget we still may need some GUI applications – yes, this machine is for CI, but imagine that at some point you’d like to debug some functionality. Ansible is one of the most used tools in this area, and has a good track record, so we’ll go with it. On top of that, automation requires some glue between different tools to configure them, provide the needed setup, and report issues in standing up new machines. The free Homebrew is great third-party package manager for macOS which we’ll use for this purpose. Since we’re talking about automation, we need to be able to install software from the command-line to efficiently manage dependencies. My tool of choice when it comes to managing python interpreters on one machine is pyenv (yes, we know there are others). Since we want to support multiple Python versions, chances are we’ll have more machines in the future, so we’ll want to automate the environment setup. However, for our continuous integration machine, we need to do a few additional steps. I started with the official tutorial on building the current version of OpenCV for macOS.

#OPENCV PYTHON MAC M1 HOW TO#

How to set up macOS for OpenCV development

opencv python mac m1

Grigory Serebryakov is OpenCV AI Chief Development Officer.














Opencv python mac m1