PyCharm 对 M1 上 PyQt6 的支持
我现在已经切换到 Pycharm 和 PyQt5,因为它可以更好地支持集成。
我们学校刚刚升级到 M1 芯片,现在我的解决方案不起作用。
我可以下载最新版本的python 3.10.2。
然后我在终端中运行以下命令。
Python3.10.2 -m pip install PyQt6
为了测试代码,我将以下内容输入到空闲中:
import sys
from PyQt6 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
widget.resize(400, 200)
widget.setWindowTitle("This is PyQt Widget example")
widget.show()
exit(app.exec())
这一切都运行良好,并且将显示一个窗口。
然后我打开 Pycharm 2021.3 社区版。
选择相同的解释器并加载全局依赖项。
我运行它,然后这是我得到的错误
据我所知 PyQt6 支持 Arm 和 86来自同一下载源的架构。是否可以强制解释器仅使用手臂,或者 PyCharm 是否知道凭直觉执行此操作?
我试图让学生首先使用 QT 设计器的拖放构建器。
I've now swapped over to Pycharm and PyQt5 as it had better support an integration.
Our school has just upgraded to M1 chips and now my solution doesn't work.
I can download the latest version of python 3.10.2.
I then run the following command in terminal.
Python3.10.2 -m pip install PyQt6
To test the code I then type this into idle:
import sys
from PyQt6 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
widget = QtWidgets.QWidget()
widget.resize(400, 200)
widget.setWindowTitle("This is PyQt Widget example")
widget.show()
exit(app.exec())
This all works perfectly and a window will be displayed.
I then open up Pycharm 2021.3 community edition.
Select the same interpreter and load global dependencies.
I run it and then this is the error I get
From what I can read PyQt6 supports both the Arm and 86 architecture from the same download source. Is it possible to force an interpreter to use just the arm or does PyCharm know to do this intuitively?
I'm trying to get students to use the drop and drag builder with QT designer first.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论