2

Here's what I'm getting when I try to run anki from the command line: `

Traceback (most recent call last):
  File "/usr/bin/anki", line 5, in <module>
    import aqt
  File "/usr/share/anki/aqt/__init__.py", line 12, in <module>
    from aqt.qt import *
  File "/usr/share/anki/aqt/qt.py", line 22, in <module>
    from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
ImportError: No module named QtWebKit
“anki &” has ended`

Looking at my system I do notice I have a PyQt5.QtWebKit installed ( or something like that ) while here's asking for PyQt4. How do I reconcile ?

Blaszard
  • 30,954
  • 51
  • 153
  • 233
  • 2
    Possible of duplicate http://stackoverflow.com/questions/2922711/importerror-no-module-named-qtwebkit – Rahul K P Jan 03 '17 at 10:16
  • 2
    question on askubuntu: https://askubuntu.com/questions/840318/importerror-no-module-named-pyqt4-qtwebkit#840946 – hiro protagonist Jan 03 '17 at 10:35
  • With input from those questions i searched for python4-qt and it is installed: `python-qt4 - Python bindings for Qt4 python-qt4-dbg - Python bindings for Qt4 (debug extensions) python-qt4-dbus - D-Bus Support for PyQt4 python-qt4-dbus-dbg - D-Bus Support for PyQt4 (debug extensions) python-qt4-dev - Development files for PyQt4 python-qt4-doc - Documentation and examples for PyQt4 python-qt4-gl - Python bindings for Qt4's OpenGL module python-qt4-gl-dbg - Python bindings for Qt4's OpenGL module (debug extension)` . However, it's still complaining – Sorin Ghinescu Jan 03 '17 at 10:59
  • Still no solution. What else I tried was to install PySide and to link its libraries, but still didn't work although I got a different set of errors. I rolled back. There must be a pyqt4 explanation and solution , just seems it's not popular enough to be answered – Sorin Ghinescu Jan 08 '17 at 09:11
  • Finally solved it! I had to manually install PyQt4 based on these instructions: https://blog.qtibia.ro/2016/06/21/build-python-qt4-on-debian-testing/ – Sorin Ghinescu Jan 09 '17 at 10:27

2 Answers2

0

I finally managed to properly install PyQt4 based on these instructions : https://blog.qtibia.ro/2016/06/21/build-python-qt4-on-debian-testing/ And now I got anki running properly.

0

I also ran into this issue on Ubuntu MATE 17.04. The best solution I've found is to install the compiled version of Anki from their website -> https://apps.ankiweb.net/#linux since it bundles all the required libraries.