Anki does not work on Ubuntu 24.04.2

Hi! I am trying to install anki 25.09 on ubuntu 24.04.2 and encountering some problems. I will describe what I have tried. Please let me know if anyone has suggestions about how to fix anki on my machine.

• I downloaded anki 25.09 and followed the installation guide
• When I tried to run anki, I saw an error screen that said “Anki encountered a problem. Please follow the troubleshooting steps.” I copied the debugging info, some of which I included below.

Anki 25.09.2 (3890e12c)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: Linux-6.8.0-87-generic-x86_64-with-glibc2.39

Traceback (most recent call last):
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/progress.py”, line 121, in handler
func()
~~~~^^
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/main.py”, line 231, in on_window_init
fn()
~~^^
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/main.py”, line 330, in setupProfile
self.loadProfile()
~~~~~~~~~~~~~~~~^^

• I then uninstalled anki, deleted all associated files, and restarted my computer.
• Next, I downloaded anki 25.09 and again followed the installation guide. I still received the same error message when attempting to run anki.
• I followed a post (that I can’t link) and ran sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0, but still can’t run anki.
• I also followed the System Qt versions instructions at the install and upgrade manual, but remain unable to use anki.
• Now when I run anki, I see

ankylosaurus@computer:~/anki-launcher-25.09-linux $ anki
Traceback (most recent call last):
File “”, line 1, in
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/init.py”, line 65, in
from aqt import gui_hooks
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/gui_hooks.py”, line 11, in
from _aqt.hooks import *
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/_aqt/hooks.py”, line 18, in
from aqt.qt import QDialog, QEvent, QMenu, QModelIndex, QWidget, QMimeData
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/qt/init.py”, line 19, in
from .qt6 import *
File “/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/qt/qt6.py”, line 16, in
from PyQt6.QtQuick import *
ModuleNotFoundError: No module named ‘PyQt6.QtQuick’

• I also receive the above error message when I run anki --no-sandbox in my terminal.
• Now if I search for anki and try to open it on my computer via the GUI, nothing opens.

I’d appreciate any guidance. Thank you!

I assume you followed Install & Upgrade - Anki Manual and the forum entry you couldn’t link to was Issues running on Ubuntu 24.04?

On my debian I have a lot of other python3 files that seem relevant, maybe try installing them on ubuntu:

python3-pyqt6
python3-pyqt6.qtmultimedia
python3-pyqt6.qtqml
python3-pyqt6.qtquick
python3-pyqt6.qtsvg
python3-pyqt6.qttexttospeech
python3-pyqt6.qtwebchannel
python3-pyqt6.qtwebengine
python3-pyqt6.sip

Could you provide the full error message (after redacting usernames etc.)?

@Anon_0000 Yes, you are correct, I did follow the Install & Upgrade - Anki Manual instruction. You are also correct that I couldn’t link to “Issues running on Ubuntu 24.04.”

I tried installing the files you listed, then ran anki again in my terminal. Here is the resulting error message that I see in terminal. Hope this is helpful, @llama.

username@computer:~ $ anki

Starting Anki 25.09.2...

Wayland support is disabled by default due to bugs:




You can force it on with an env var: ANKI_WAYLAND=1

2025-11-16 14:59:46,255:INFO:aqt.mediasrv: Serving on http://127.0.0.1:36689

Qt info:




GL Type: desktop

Surface Type: OpenGL

Surface Profile: CompatibilityProfile

Surface Version: 4.6

QSG RHI Backend: OpenGL

Using Supported QSG Backend: yes

Using Software Dynamic GL: no

Using Multithreaded OpenGL: yes




Init Parameters:

* application-name Anki

* browser-subprocess-path /usr/lib/qt6/libexec/QtWebEngineProcess

* create-default-gl-context

* disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture

* disable-setuid-sandbox

* disable-speech-api

* enable-features NetworkServiceInProcess,TracingServiceInProcess

* enable-threaded-compositing

* in-process-gpu

* use-gl desktop



Starting main loop...

Traceback (most recent call last):

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/progress.py", line 121, in handler

func()

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/main.py", line 231, in on_window_init

fn()

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/main.py", line 330, in setupProfile

self.loadProfile()

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/main.py", line 515, in loadProfile

self.setup_sound()

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/main.py", line 628, in setup_sound

aqt.sound.setup_audio(self.taskman, self.pm.base, self.col.media.dir())

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/sound.py", line 944, in setup_audio

mpvManager = MpvManager(base_folder, media_folder)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/sound.py", line 456, in __init__

super().__init__(window_id=None, debug=False)

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/mpv.py", line 466, in __init__

super().__init__(*args, **kwargs)

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/mpv.py", line 107, in __init__

self._start_process()

File "/home/username/.local/share/AnkiProgramFiles/.venv/lib/python3.12/site-packages/aqt/mpv.py", line 133, in _start_process

self._proc = subprocess.Popen(self.argv, env=self.popenEnv)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__

self._execute_child(args, executable, preexec_fn, close_fds,

File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

NotADirectoryError: [Errno 20] Not a directory: 'mpv'

Thank you both for your responses.

Do you have mpv installed and present in PATH?

@llama I ran sudo apt install mpv and now when I run anki in my terminal, the program opens. Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.