New online installer/launcher

Switching between versions was described in dae’s post above. You do have to edit the TOML file.

1 Like

Using 25.06b5 ( 782645d) on Windows,

  • Typing anki into the Task Manager search shows nothing.
  • Typing mpv into the Task Manager search shows “〉Python”, and clicking to expand shows “﹀ Python” with “mpv” displayed on the next line.
1 Like

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 :thinking: Kinda odd because my gobal system python is 3.12.9

3 Likes

same issue

1 Like

I have not had time to address all the issues yet (some will require a new beta), but new launchers are now available to try:

Use the same debug console command mentioned here after installing it:

Make sure betas are enabled in the menu before you try to update to the latest (which is still 25.06b5).

2 Likes

Feature request: Allow user to select beta or stable release from a drop down menu next to this option

1 Like

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

That won’t happen once the first stable release with this system goes out.

1 Like

This launcher uses the classic Windows Console interface instead of the modern Terminal app even though Terminal is the default on my computer.

The previous launcher used the Terminal app.

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

1 Like

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.

Sorry if this is intentional for now, then I overlooked something. But if not, this would be nice to have native builds.

1 Like

I’m using the new launcher and have Apple Silicon binaries (on an M4 machine).

2 Likes

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.)

3 Likes

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.

2 Likes

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.

3 Likes

I’m assuming this will be phased out in the future, when the launcher becomes the default.

Though I really wish that this way of building anki (i.e having a complete offline build) will still be possible in the future.

2 Likes

New launchers and a new beta are now available: Anki 25.06 Beta - #117 by dae

I’ll post a follow-up with replies to various posts either later tonight or tomorrow.

1 Like

(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.

2 Likes

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?

3 Likes