python cannot import opencv because it can't find libjpeg.8.dylib

前端 未结 4 1271
Happy的楠姐
Happy的楠姐 2020-12-10 14:52

Trying to get opencv for python working on Mac OSX - Mavericks but keep getting an image not found for libjpeg.8.dylib when doing import cv from python

(Recently upd

4条回答
  •  天命终不由人
    2020-12-10 15:27

    I used brew a for installing OpenCV on my mac, and ran into this same problem, but it was with an Xcode C++ console application.

    However an alternative method to solve the problem is to copy cp the file to the library location.

    cp /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/lib/libjpeg.8.dylib
    

    Or the latter, which I don't suggest, just stating another method is to use move mv the entire file location into your /usr/local/lib/ directory.

    mv /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/lib/
    

提交回复
热议问题