Skip to content

[Anki 23.10 beta 6] No module named 'PyQt5' #27

@khonkhortisan

Description

@khonkhortisan

The Qt5 compatibility code is now off by default, which may break some add-ons that haven't been updated to support Qt6 in the last 2 years. If you find any have broken, please report the issues to the add-on author, and start Anki after setting the env var ENABLE_QT5_COMPAT to 1 to temporarily restore the compatibility code.

Error
Un complemento que has instalado ha fallado al cargarse. Si los problemas persisten, por favor ve a Herramientas> Menú de complementos o deshabilita este complemento.

Mientras cargando '⁨Touch Screen - draw and write on your cards⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 239, in loadAddons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1631622775\__init__.py", line 31, in <module>
    from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
ModuleNotFoundError: No module named 'PyQt5'

1631622775_init_.py

#from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
#from PyQt5 import QtCore
#from PyQt5.QtGui import QKeySequence
#from PyQt5.QtGui import QColor
#from PyQt5.QtCore import pyqtSlot as slot
try:
    from PyQt6.QtWidgets import QMenu, QColorDialog, QMessageBox, QInputDialog
    from PyQt6.QtGui import QAction
    from PyQt6 import QtCore
    from PyQt6.QtGui import QKeySequence
    from PyQt6.QtGui import QColor
    from PyQt6.QtCore import pyqtSlot as slot
except ImportError:
    from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
    from PyQt5 import QtCore
    from PyQt5.QtGui import QKeySequence
    from PyQt5.QtGui import QColor
    from PyQt5.QtCore import pyqtSlot as slot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions