Anki fails to start in Yakkety due to missing PyQt4-WebKit

Bug #1633737 reported by David Oftedal
130
This bug affects 24 people
Affects Status Importance Assigned to Milestone
anki (Debian)
Fix Released
Unknown
anki (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Anki fails to start in Yakkety due to a failure to import PyQt4-WebKit.

Traceback (most recent call last):
  File "/usr/bin/anki", line 7, 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

David Oftedal (rounin)
no longer affects: mnemosyne (Ubuntu)
no longer affects: spyder (Ubuntu)
Revision history for this message
David Oftedal (rounin) wrote :

See also:
https://bugs.launchpad.net/ubuntu/+source/mnemosyne/+bug/1633725 Mnemosyne fails to start in Yakkety due to missing QtWebKit
https://bugs.launchpad.net/ubuntu/+source/spyder/+bug/1620300 Spyder won't start

Revision history for this message
David Oftedal (rounin) wrote :

"Some PyQt4 applications fail to start in Yakkety due to missing QtWebKit"
https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/1633819

Changed in anki (Ubuntu):
status: New → Confirmed
Revision history for this message
David Oftedal (rounin) wrote :

Temporary fix:

1. Add the Xenial repositories to /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe

2. apt-get update

3. Install older version of PyQt4

apt-get install python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4

Changed in anki (Debian):
status: Unknown → New
summary: - Anki fails to start in Yakkety due to missing QtWebKit
+ Anki fails to start in Yakkety due to missing PyQt4-WebKit
description: updated
Mathew Hodson (mhodson)
Changed in anki (Ubuntu):
importance: Undecided → High
Revision history for this message
bhikkhu subhuti (bksubhuti) wrote :

If you do sudo apt upgrade, you will need to install that library file manually again. It is good to have on-hand. You will also need to install using sudo dpkg -1 pytho*.deb in order to avoid apt from refusing to install an older package.

tags: added: zesty
Revision history for this message
Mutlu Can YILMAZ (mtlcnylmz) wrote :

Same in zesty.

Revision history for this message
Bart van Herk (evanherk) wrote :

I had this problem in zesty. tried to edit /etc/apt/sources.list with gedit but it wouldn't let me write the result because the file was marked read-only. So I did the following:

I added the two repositories in the 'software and updates' app:

deb http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe

and then ran

sudo apt-get install python-qt4=4.11.4+dfsg-1build4 python-qt4-sql=4.11.4+dfsg-1build4

in the terminal. Then it worked.

Revision history for this message
Bart van Herk (evanherk) wrote :

update: I followed this suggestion on the anki web page. Worked for me.

Please get a deb package from our website at http://apps.ankiweb.net instead and see if that works -- the version in Ubuntu's repository is extremely out of date.

perhaps de ubuntu repository version should be updated?

Revision history for this message
Pander (pander) wrote :

No the version anki_2.0.45_all.deb from the official website results in the same error.

tags: added: upgrade-software-version
Revision history for this message
Pander (pander) wrote :

It does work by installing with

  dpkg -i python-qt4_4.11.3+dfsg-1_amd64.deb

after downloading http://launchpadlibrarian.net/190293251/python-qt4_4.11.3+dfsg-1_amd64.deb from https://launchpad.net/ubuntu/vivid/amd64/python-qt4/4.11.3+dfsg-1

Revision history for this message
ipatrol (ipatrol6010) wrote :

Considering that bug 1633819 has been closed as WONTFIX, I would recommend that Ubuntu remove Anki from its repository until, if ever, the upstream moves to Qt5. We shouldn't retain packages for which we have chosen not to support their dependencies. If people wish to install the program, they must find a way to do so outside of the project.

Revision history for this message
Joshua Panter (josh.p) wrote :

why not just package the compiled package from https://apps.ankiweb.net/? Has this been done, is there a repo with this?

Can anybody confirm if #6 from above fixes the problem?

Revision history for this message
emk2203 (emk2203) wrote : Re: [Bug 1633737] Re: Anki fails to start in Yakkety due to missing PyQt4-WebKit

​I would suggest to switch to Anki 2.1 beta
<https://apps.ankiweb.net/docs/beta.html>, which is in testing for over a
year now (beta 25 currently) and looks good enough.

It uses the latest dependencies (Python 3, Qt 5.9) and should be the future
of Anki.

Downside is that plugins for Anki need to be rewritten. I am not sure about
their status now, but even an Anki with limited plugin
availability is better than no Anki at all in the distribution.

Those who need more can alwas install the compiled package as Joshua Panter
suggested.

Erik Koennecke

Am 16.11.2017 1:59 nachm. schrieb "Joshua Panter" <
<email address hidden>>:

> why not just package the compiled package from
> https://apps.ankiweb.net/? Has this been done, is there a repo with
> this?
>
> Can anybody confirm if #6 from above fixes the problem?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1660984).
> https://bugs.launchpad.net/bugs/1633737
>
> Title:
> Anki fails to start in Yakkety due to missing PyQt4-WebKit
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/anki/+bug/1633737/+subscriptions
>

Pander (pander)
tags: added: bionic
Changed in anki (Debian):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

anki version 2.1 is in bionic

Changed in anki (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.