How to properly install Python on OSX for use with OpenCV?

前端 未结 4 1822
刺人心
刺人心 2021-02-06 15:38

I spent the past couple of days trying to get opencv to work with my Python 2.7 install. I kept getting an error saying that opencv module was not found whenever I try \"import

4条回答
  •  逝去的感伤
    2021-02-06 16:15

    You need to install the module using your python2.7 installation. Pointing your PYTHONPATH at stuff installed under 2.6 to run under 2.7 is a Bad Idea.

    Depending on how you want to install it, do something like python2.7 setup.py or easy_install-2.7 opencv to install.

    fwiw, on OS X the modules are usually installed under /System/Library/Frameworks/Python.framework/ but you should almost never need to know where anything installed in your site packages is physically located; if Python can't find them without help you've installed them wrong.

提交回复
热议问题