现在。当我运行它时。错误来了
ImportError: dlopen(/Users/v/Library/Python/3.8/lib/python/site-packages/PyQt5/QtWidgets.abi3.so, 2): 找不到合适的图像。确实找到了:/Users/v/Library/Python/3.8/lib/python/site-packages/PyQt5/QtWidgets.abi3.so: mach-o,但架构错误/Users/v/Library/Python/3.8/lib/ python/site-packages/PyQt5/QtWidgets.abi3.so: mach-o,但架构错误
原文由 vihanchou 发布,翻译遵循 CC BY-SA 4.0 许可协议
经过数小时的反复试验,我终于能够解决这个问题。我成功的配置是:
使用 Rosetta 2 打开终端 ( https://dev.to/courier/tips-and-tricks-to-setup-your-apple-m1-for-development-547g )
使用非自制的python(我的在/usr/bin/python3)创建虚拟环境
升级点
安装 PyQt5 “` pip install PyQt5
”`