gpt4 book ai didi

python - brew install opencv3 显然成功,但缺少 cv2.so 和 cv2.py

转载 作者:太空狗 更新时间:2023-10-30 01:33:18 27 4
gpt4 key购买 nike

我正在尝试在我的 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

所以 homebrew 似乎认为安装很顺利,但是locate cv2.so 什么也没找到...

locate *cv*.so 

只找到

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

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

cv2.py 或 cv.py 也不存在...有什么想法吗?

最佳答案

我在使用 raspian 之前看到过这个错误,在 ubuntu 中也看到过,将 cv2.cpython-35m-darwin.so 重命名为 cv2.so 可能有助于解决这个问题.

我听说这只是一个标准的命名错误。

关于python - brew install opencv3 显然成功,但缺少 cv2.so 和 cv2.py,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34227934/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com