ZBAR与MacBook Pro M1不兼容?

发布于 2025-01-21 09:05:50 字数 650 浏览 3 评论 0原文

我正在尝试使用Pyzbar创建Python条形码阅读应用程序。

https://pypi.org/project/project/project/pyzbar/ 指出ZBAR共享库需要是单独安装。

brew install zbar

最初,我发现找不到库的错误。

ImportError: Unable to find zbar shared library

来手动链接到库,

$ mkdir ~/lib
$ ln -s $(brew --prefix zbar)/lib/libzbar.dylib ~/lib/libzbar.dylib

然后,我尝试使用现在使用以下错误错误

/opt/homebrew/Cellar/zbar/0.23.90_1/lib/libzbar.0.dylib: mach-o, but wrong architecture

这是该库与M1不兼容的问题吗?有解决这个问题的解决方案吗?

I'm trying to create a Python barcode reading app using pyzbar.

https://pypi.org/project/pyzbar/ notes that the zbar shared library needs to be separately installed.

brew install zbar

I initially got the following error that the library couldn't be found.

ImportError: Unable to find zbar shared library

and then I tried to manually link to the library using

$ mkdir ~/lib
$ ln -s $(brew --prefix zbar)/lib/libzbar.dylib ~/lib/libzbar.dylib

now I get the following error error

/opt/homebrew/Cellar/zbar/0.23.90_1/lib/libzbar.0.dylib: mach-o, but wrong architecture

Is the problem that this library is not compatible with M1? Is there a solution for this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文