【发布时间】:2019-11-13 15:15:47
【问题描述】:
我在 Raspberry Pi 4 上运行 PyQt5 时遇到问题。
我使用树莓派 4,版本 10(buster)内核版本 4.19.75-v71。
默认的python是3.7.3。
我按照这个线程here 中提到的安装 sip 和 PyQt5 的完全相同的步骤进行操作。我还按照上述线程中介绍的步骤安装了 python 3.6.0。
在没有任何错误的情况下完成安装后,当我运行我的代码时,我遇到以下错误消息:
qt5ct: using qt5ct plugin
QEGLPlatformContext: Failed to create context: 3009
QOpenGLWindow::beginPaint: Failed to create context
QOpenGLWindow::beginPaint: Failed to make context current
Traceback (most recent call last):
File "my_code.py", line 68, in initializeGL
self.gl = self.context().versionFunctions()
AttributeError: module 'PyQt5._QOpenGLFunctions_ES2' has no attribute 'QOpenGLFunctions_ES2'
Aborted
任何指导如何克服这个问题?非常感激。提前致谢。
PS代码在Win10上运行流畅。因此,代码本身一定没有问题。 (Win10上的环境为:numpy=1.14.3;numpy-stl=2.5.0;pyqt5=5.10.1;sip=4.19.8;六=1.11.0;python=3.6.0;python-utils=2.3 .0)
【问题讨论】:
标签: python-3.x raspberry-pi pyqt5 raspbian debian-buster