matplotlib | QObject::moveToThread: Current thread (0x831f000) is not the object's thread (0x95b40e0). Cannot move to target thread (0x831f000)

huangapple go评论158阅读模式
英文:

matplotlib | QObject::moveToThread: Current thread (0x831f000) is not the object's thread (0x95b40e0). Cannot move to target thread (0x831f000)

问题

以下是已翻译的内容:

有关此错误的现有帖子,但不与使用 matplotlib 结合使用。

  1. QObject::moveToThread: 当前线程 (0x831f000) 不是对象的线程 (0x95b40e0)。
  2. 无法移动到目标线程 (0x831f000)。
  3. qt.qpa.plugin:尽管已找到,但无法在“/home/me/miniconda3/envs/venv/lib/python3.9/site-packages/cv2/qt/plugins”中加载Qt平台插件“xcb”。
  4. 此应用程序无法启动,因为无法初始化任何Qt平台插件。重新安装该应用程序可能会解决此问题。
  5. 可用的平台插件包括:xcbeglfsminimalminimalegloffscreenvncwebgl
  6. 中止 (核心已转储)
英文:

There were existing posts regarding this error, but not in conjunction with using matplotlib.

  1. QObject::moveToThread: Current thread (0x831f000) is not the object's thread (0x95b40e0).
  2. Cannot move to target thread (0x831f000)
  3. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/me/miniconda3/envs/venv/lib/python3.9/site-packages/cv2/qt/plugins" even though it was found.
  4. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
  5. Available platform plugins are: xcb, eglfs, minimal, minimalegl, offscreen, vnc, webgl.
  6. Aborted (core dumped)

答案1

得分: 0

设置环境变量 QT_PLUGIN_PATH 可能会解决错误:

  1. export QT_PLUGIN_PATH=/home/me/miniconda3/envs/venv/lib/python3.9/site-packages/cv2/qt/plugins

如果不行,安装依赖项:

  1. sudo apt-get install libxcb1
  1. pip install pyqt5
英文:

Setting the environment variable QT_PLUGIN_PATH, in terminal, may resolve the error:

  1. export QT_PLUGIN_PATH=/home/me/miniconda3/envs/venv/lib/python3.9/site-packages/cv2/qt/plugins

If not, install the dependencies:

  1. sudo apt-get install libxcb1
  1. pip install pyqt5

huangapple
  • 本文由 发表于 2023年8月10日 18:16:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76874787.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定