I've installed Anki from "Ubuntu software" and as an addition installed this: sudo apt-get install python3-distutils
(because of known issue) and it still doesn't work. Could someone please explain to me what should I do to fix the problem?
Upd1: After launching from terminal (as @Emmet asked) the output is here:
su@uranus:~$ anki
Traceback (most recent call last):
File "/usr/bin/anki", line 6, in <module>
import aqt
File "/usr/share/anki/aqt/__init__.py", line 32, in <module>
import aqt.forms
File "/usr/share/anki/aqt/forms/__init__.py", line 44, in <module>
from . import about
File "/usr/share/anki/aqt/forms/about.py", line 42, in <module>
from aqt.webview import AnkiWebView
File "/usr/share/anki/aqt/webview.py", line 90, in <module>
class AnkiWebView(QWebEngineView):
NameError: name 'QWebEngineView' is not defined
The only problem here is a forgotten import in the Python script mentioned at the bottom of the traceback :
Just open webview.py and add the import needed:
(There are a bunch of other imports missing from QtWebEngineWidgets aside from QWebEngineView, so it's easier to just import them all)
I've the same problem today :D this the steps how i fixed it
First remove anki:
Second install anki from this steps https://apps.ankiweb.net/
1) Downloads Anki from website
https://apps.ankiweb.net/downloads/current/anki-2.1.11-linux-amd64.tar.bz2
2) Installation
3) to run anki
use this
/usr/local/share/anki/bin/anki
write it on terminalOr
and write in /usr/bin/anki file this code
save file and write on terminal
now you can run anki just when you write
anki
on terminalcongratulation :D
You're not importing QWebPage.
Try adding this import to the top of your script:
Source: https://stackoverflow.com/questions/41754786/nameerror-name-qwebpage-is-not-defined
This is a KNOWN BUG and is already in the process of being fixed.
I have already uploaded a fix to the repos for this. It awaits SRU team release into the
disco-updates
pocket of the repositories.More details at: https://bugs.launchpad.net/ubuntu/+source/anki/+bug/1825722
FYI, a fix was released as of 19.04. So the workaround shouldn't be necessary from now on. Still, the upstream Debian package seems to be barely maintained and affected by the same bug.