尝试使用pyqtgraph+pyserial实现实时读取串口数据并显示波形图
问题描述
遇到bug,具体为:
Traceback (most recent call last):
File ".\multi_thread2.py", line 4, in <module>
import pyqtgraph as pg
File "D:\apps\Anaconda\lib\site-packages\pyqtgraph\__init__.py", line 17, in <module>
from .colors import palette
File "D:\apps\Anaconda\lib\site-packages\pyqtgraph\colors\palette.py", line 1, in <module>
from ..Qt import QtGui
File "D:\apps\Anaconda\lib\site-packages\pyqtgraph\Qt\__init__.py", line 170, in <module>
from PyQt5 import QtSvg
ValueError: PyCapsule_GetPointer called with incorrect name
原因分析:
原因推测为 PyQt5版本问题
解决方案:
1、更新pip
python -m pip install --upgrade pip
2、重新安装pyqtgraph及PyQt5
pip install pyqtgraph
pip install PyQt5
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)