简体   繁体   中英

brew install opencv3 apparently successful, but missing cv2.so and cv2.py

I'm trying to setup a working environment on my mac:

brew install opencv3 --c++11 --with-contrib --with-gphoto2 --with-python3
==> Installing opencv3 from homebrew/homebrew-science

...

==> cmake .. -DCMAKE_C_FLAGS_RELEASE= -DCMAKE_CXX_FLAGS_RELEASE= -DCMAKE_INSTALL
==> make
==> make install
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

opencv3 and opencv install many of the same files.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/opencv3/lib
    CPPFLAGS: -I/usr/local/opt/opencv3/include

==> Summary
🍺  /usr/local/Cellar/opencv3/3.0.0: 351 files, 110M, built in 5.4 minutes

So homebrew seems to think the install went well, but locate cv2.so finds nothing...

locate *cv*.so 

finds only

/usr/local/Cellar/opencv3/3.0.0/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so

and

/usr/local/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so

cv2.py or cv.py does not exist as well... Any ideas?

ive seen this error before using raspian, its also seen in ubuntu, renaming cv2.cpython-35m-darwin.so to cv2.so may help fix the issue.

ive heard it just a standard naming error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM