Has anyone ever had OpenCV work with Python 2.7 on MacOS 10.6?

前端 未结 2 1590
傲寒
傲寒 2021-02-13 07:25

I\'ve been trying on and off for the past 6 months to get OpenCV to work with Python on MacOS. Every time there\'s a new release, I try again and fail. I\'ve tried both 64-bit a

相关标签:
2条回答
  • 2021-02-13 08:09

    Coincidentally, I did this yesterday, and it works now. I used the guide found here, in Section 2, "Building via Homebrew".

    Except, it says.

    sudo brew install python     ( the system python is not good enough)
    

    DO NOT ADD THIS LINE. It gave me so much trouble. Python 2.6.1 runs perfectly with OpenCV. By adding that line, homebrew installs Python2.7, and OpenCV will then bind to that version in stead of the default system version. You can then move the cv.so file, but you will still get the version mismatch error.

    I don't know why you were downvoted, it's a legitimate problem, perhaps people think you should take your problem to the OpenCV people.

    0 讨论(0)
  • 2021-02-13 08:14
    brew install opencv
    

    works like a charm

    0 讨论(0)
提交回复
热议问题