【Python Debug】pyqtgraph ValueError: PyCapsule

【Python Debug】pyqtgraph ValueError: PyCapsule,第1张

[Python] Debug ValueError: PyCapsule_GetPointer called with incorrect name:

尝试使用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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/569002.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-09
下一篇 2022-04-09

发表评论

登录后才能评论

评论列表(0条)

保存