Here are a couple of add-on errors resulting from assumptions about the version string:
ValueError: invalid literal for int() with base 10
Anki 25.06b5 (782645d9) (ao)
Python 3.13.5 Qt 6.8.1 PyQt 6.8.0
Platform: macOS-14.6.1-arm64-arm-64bit-Mach-O
When loading AnkiConnect:
Traceback (most recent call last):
File "/Users/andrewsanchez/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/addons.py", line 250, in loadAddons
__import__(addon.dir_name)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/2055492159/__init__.py", line 19, in <module>
anki_version = tuple(int(segment) for segment in aqt.appVersion.split("."))
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/2055492159/__init__.py", line 19, in <genexpr>
anki_version = tuple(int(segment) for segment in aqt.appVersion.split("."))
~~~^^^^^^^^^
ValueError: invalid literal for int() with base 10: '06b5'
When loading The KING of Button Add-ons:
Traceback (most recent call last):
File "/Users/andrewsanchez/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/addons.py", line 250, in loadAddons
__import__(addon.dir_name)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/374005964/__init__.py", line 13, in <module>
from . import answer_buttons
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/374005964/answer_buttons.py", line 12, in <module>
from .nmcheck import isnightmode
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/374005964/nmcheck.py", line 5, in <module>
old_anki = tuple(int(i) for i in anki_version.split(".")) < (2, 1, 20)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andrewsanchez/Library/Application Support/Anki2/addons21/374005964/nmcheck.py", line 5, in <genexpr>
old_anki = tuple(int(i) for i in anki_version.split(".")) < (2, 1, 20)
~~~^^^
ValueError: invalid literal for int() with base 10: '06b5'
I also noticed on MacOS there is no Anki icon in the dock and Python 3.1.13 is apparently being used. Maybe something caused by my local uv installation Kinda odd because my gobal system python is 3.12.9
The error message when trying to install the latest anki whlle Allow betas is off might be a bit daunting
1) Latest Anki (just press enter)
2) Choose a version
3) Keep existing version
4) Allow betas: off
5) Quit
> 1
Updating Anki...
Ignoring existing lockfile due to change in pre-release mode: `allow` vs. `if-necessary-or-explicit`
x No solution found when resolving dependencies for split (python_full_version >= '3.10'):
`-> Because there is no version of anki==0.1.2 and anki-release==0.1.2 depends on anki==0.1.2, we can conclude that
anki-release==0.1.2 cannot be used.
And because only anki-release==0.1.2 is available and your project depends on anki-release, we can conclude that
your project's requirements are unsatisfiable.
hint: Pre-releases are available for `anki-release` in the requested range (e.g., 25.6b5), but pre-releases
weren't enabled (try: `--prerelease=allow`)
Install failed: Failed with code Some(1): C:\Users\User\AppData\Local\Programs\Anki\uv.exe sync --upgrade --managed-python --python 3.13.5
1) Latest Anki (just press enter)
2) Choose a version
3) Keep existing version
4) Allow betas: off
5) Quit
This error seems to be caused by the version of Anki returned by aqt.appVersion in the pre-release being 25.06b5 instead of numbers. (If future official releases do not include a string like b5 this error may not occur?) If you use pointVersion instead I think it’s probably safe (pointVersion is available from Anki2.1.20+). from anki.utils import pointVersion
One thing I only noticed today, is even though I’m using an M2 Mac and had definitely installed the Apple Silicon binaries before, now apparently after using the launcher it’s all Intel binaries. I had noticed everything being a bit slower to load than before and on a hunch opened Activity Monitor to check.
Figured out the reason: I had the Terminal.app set to start with Rosetta emulation (you can right click > “show info” on any app with universal binaries and there’ll be a checkbox beneath the copyright info). Because the new Anki launcher uses that to install itself in macOS, then the whole install also got emulated apparently. I guess it’s my fault, even though I would describe this kind of interaction here as unexpected.
I don’t normally use Terminal.app myself but another terminal emulator, so I didn’t notice this in daily usage of my system.
(Edit: If this happened to you and you want to switch to Apple Silicon, make sure to also remove the python binary and everything located under .local/share/uv otherwise it will just install the Intel version again.)
Is it still possible to use system dependencies (the way anki package in the AUR does currently)? I don’t like the idea of storing dependencies in the home folder when they’re already installed in the system.
Building the program with OFFLINE_BUILD=1 and system dependencies still works. With the environment variable set, the build system skips building the launcher though, so you don’t get auto-updates.
(Getting deja vu - apologies if I’m repeating myself here)
We can’t just use the place Anki’s installed, as it may be a read-only location, and it definitely is on macOS & on Linux when installed in a system folder.
From the latest installer/beta, you can use the new option in the tools menu to update to a different release. The old pop-up notifications will also work to update, but they aren’t sent out for every minor update, and certainly not betas.
There are some caveats/surprises. You lose the upgrade/downgrade menu option in older versions, though an add-on could provide that, or you can manually re-run the Windows installer, bump the pyproject.toml mtime, or remove the AnkiProgramFiles folder. And older versions won’t be able to play audio unless mpv is on the path. But this should only be an issue for stable releases made prior to this launcher.
Recent builds require glibc2.36 or later. glibc has no way of targeting older versions, so the glibc you build on is the oldest you can target, and we need a modern-enough one that can also support ARM64 for development.
The launcher is an additional layer. As I covered earlier, distros doing 1 or 2 should only require minor changes, and the launcher is optional.
Sorry maybe I missed this, but I have a few q’s:
Is there (still) any way to run it with system Qt?
Does this affect building and running from source package in any way?
Unfortunately, this installer format is a showstopper for portable installation, such as what Scoop or Pog (my project) are doing.
Both package managers download the installer .exe, but unpack it using 7zip and then run Anki by passing -b path/to/portable/data/dir. With launchers, there’s not really any way to unpack them, so I’ll have to drop support for new versions of Anki, and I suspect Scoop will do the same.
If you want to keep the launcher, could you please at least provide a static .zip for each version with everything necessary to run Anki?