Anki 26.05: No Way to Change Input Method [Linux]

I have recently installed Anki 26.05 on my Debian 13 system (amd64), on which I am running just awesomewm + fcitx5, using pipx, as some very nice guy suggested. I used to run Anki 24.11 before, so there’s a database already, and I have a number of add-ons installed: Chinese Support 3, Review Heatmap, Search and Replace Tags, Progress Graphs and Stats for Learned and Matured Cards, Change Font Size, AnkiConnect and AnkiWebView Inspector. All add-ons are updated to the max, the database has been upgraded as well, and there’s no newer version of Anki available, except for a beta. I also have X, some wayland libs and an fcitx5 infrastructure. Everything works fine for apps that are not Anki. In Anki, however, I can’t switch an input method. Reproduce by

  1. Start Anki, eg.: env QT_IM_MODULE=fcitx5 QT_DEBUG_PLUGINS=1 anki --safemode
  2. Open the card browser.
  3. Try to switch to eg. a Chinese input method in the search box.

I am using the pipx method of installation after trying to install from the tar archive failed, due to a problem with six.moves, which I could not solve (I did install it into the virtualenv that came with Anki).

I tried several options for environment variables, eg. QT_IM_MODULE=fcitx, or just unsetting this variable, to no avail.

What is the way forward here, please?

Have you gone through this thread thoroughly?

See also:

It might also be related to some fcitx5 issues. There have been some fixes in the beta, so maybe try if your issue is fixed with those as well:

I’ve read the Fcitx5 + Japanese problem thread thoroughly, but couldn’t glean a solution from it, except for trying to compile completely from source. Ibus is completely out of the question as it doesn’t support all the input methods I need. Also, it used to work flawlessly for years with 24.11 across Debian 12 and 13 (I upgraded in Oct. 25), so there’s a regression somewhere. But thank you for the effort, anyway.

Thank you, I’ll have a look.

Note that the fix in 26.09b2 only applies to the tarball build. If you install from PyPI, you’ll have to either copy the plugin manually to the Qt directory as done in the tarball build, or install a copy of Qt provided by your distro (assuming it supports fcitx5 out of the box).

I’m currently trying to build Anki from source, but the build fails here:

I am now trying to figure out what to do from the .github directory, but it’s not straightforward, yet.

I have tried to execute this procedure after finding that the fcitx5 stuff was not installed, but without any success. Now my tree inside the venv looks like this (only the fcitx5 parts):

$ find . |grep -i fcitx
./plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so
./plugins/dbusaddons/libFcitx5Qt6DBusAddons.so
./plugins/dbusaddons/libFcitx5Qt6DBusAddons.so.1
./plugins/dbusaddons/libFcitx5Qt6DBusAddons.so.5.0.10

I also ran those patchelf commands.

But I still can’t change the input method after restarting Anki. It’s currently ⁨26.08.1 (39e4b0b4)⁩, btw.

The rpath now looks like this:

$ patchelf --print-rpath dbusaddons/* platforminputcontexts/libfcitx5platforminputcontextplugin.so
$ORIGIN/../../lib
$ORIGIN/../../lib
$ORIGIN/../../lib
$ORIGIN/../dbusaddons:$ORIGIN/../../lib

But no dice.

Have you tried installing from PyPI using pip instead? Try installing the python3-pip and python3-pyqt6 packages then run pip3 install aqt.

I’ve tried that now as well. I had these packages installed already:

$ dpkg -l python3-pip python3-pyqt6|grep '^ii ' 
ii  python3-pip    25.1.1+dfsg-1 all          Python package installer
ii  python3-pyqt6  6.9.0-2       amd64        Python bindings for Qt 6

I mean, before, I was using an installation created by pipx, but I’ve created a new virtualenv and installed anki in there, because installing it just with ‘pip install --user’ does not work.

$ pip3 install --user aqt                   
error: externally-managed-environment
...

So my current situation is:

  1. Installing from package did not work.
  2. Installing with pipx did not work, also not after retro-fitting the fcitx libraries.
  3. Installing with pip3 into a separate virtualenv does not work.

Also, just checking out the code from Github and then trying to somehow

from cogdocs import get_file_contents
cog.out(get_file_contents("build"))

as described in docs/build.md yielded nothing. Creating a virtualenv and trying to uv add cogdocs did not succeed, either, owing to some depdendcies that could not be resolved.

I have now installed the latest release from the tarball, and it works again (YAY!). But it would be great if installing it from source was easier. It worries me if I can’t re-build the software from source.

This is not something you’re supposed to run for building - it’s used for docs generation and is commented out to indicate that.

It’s not clear what problem you’re facing while building. Are you getting any errors? There are Linux-specific notes here: anki/docs/linux.md at main · ankitects/anki · GitHub

I use debian, too. Building from source is very straight forward:

git clone --single-branch --branch=main https://github.com/ankitects/anki.git
cd anki
./run

The above builds anki, then runs it. What issue do you have building anki?