Anki 25.07 fails to launch on macOS

I get a slightly different error message with a warning line:

warning: Failed to patch the install name of the dynamic library for /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13. This may cause issues when building Python native extensions.
error: Querying Python at `/Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13` failed with exit status signal: 9 (SIGKILL)
Install failed: Failed with code Some(2): /Applications/Anki.app/Contents/MacOS/uv sync --upgrade --managed-python --python 3.13.5

@UCM what macOS version? Does updating to the latest help? I presume it’s M1-M4 Mac? And I presume you haven’t installed uv yourself at some point?

I’m on the latest version, Version 15.5 (24F74). I have the M1 2020 MBP. I’ve never installed uv before.

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro17,1
Model Number: Z11C000GTLL/A
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 11881.121.1
OS Loader Version: 11881.121.

And removing that folder makes no difference? If you choose to install an older release like 24.11, does that fail in the same way?

Re: And removing that folder makes no difference?
On the first time the “1) Latest Anki (just press enter)” option in the installer is ran, I can see the python 3.15 download happening and the following message appears (i.e. the same one without the warning line):

error: Querying Python at `/Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13` failed with exit status signal: 9 (SIGKILL)
Install failed: Failed with code Some(2): /Applications/Anki.app/Contents/MacOS/uv sync --upgrade --managed-python --python 3.13.5

If I select the “1) Latest Anki (just press enter)” again the following message appears (the same one but with the warning thingy)

warning: Failed to patch the install name of the dynamic library for /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13. This may cause issues when building Python native extensions.
error: Querying Python at `/Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13` failed with exit status signal: 9 (SIGKILL)
Install failed: Failed with code Some(2): /Applications/Anki.app/Contents/MacOS/uv sync --upgrade --managed-python --python 3.13.5

Re 24.11
Identical behaviour.

If you try to run that from your terminal, does Python start correctly, or exit with signal 9?
What does file /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13 report? What does shasum -a 256 /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13 report?

You said 24.11 is identical, but is that entirely true? I’d expect the error message to switch to something about python3.9.

Yes sorry I meant identical except the corresponding python version.

If I run that from the terminal I get:

zsh: killed

The file command reports:

/Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13: Mach-O 64-bit executable arm64

The shasum reports:

3e96a8b2f541b3d5ded271fb6e2bc83aea0557e863d0a4c472fd4679d1983fec  /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13

I tried running with an older macOS in a VM and got that “warning: Failed to patch the install name” line, but the install proceeded fine. It probably won’t help, but please test again with the new launcher in the 25.07.1 release. If you get the same error, I think we need to reproduce it outside of Anki (which I can help you with) and report it to uv.

Didn’t help, however weirdly now I get a duplicated warning message:

warning: Failed to patch the install name of the dynamic library for /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13. This may cause issues when building Python native extensions.
warning: Failed to patch the install name of the dynamic library for /Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13. This may cause issues when building Python native extensions.
error: Querying Python at `/Users/username/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13` failed with exit status signal: 9 (SIGKILL)
Install failed: Failed with code Some(2): /Applications/Anki.app/Contents/MacOS/uv sync --upgrade --managed-python --python 3.13.5

How should I proceed to report this to uv?

Please try the following commands in Terminal.app. How does what you see differ?

dae@mb:~% curl -LO https://github.com/astral-sh/uv/releases/download/0.7.19/uv-aarch64-apple-darwin.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15.6M  100 15.6M    0     0  2968k      0  0:00:05  0:00:05 --:--:-- 3398k
dae@mb:~% tar xaf uv-aarch64-apple-darwin.tar.gz 
tar: Ignoring option -a in mode -x
dae@mb:~% cd uv-aarch64-apple-darwin 
dae@mb:~/uv-aarch64-apple-darwin% UV_PYTHON_INSTALL_DIR=python ./uv python install 3.13.5
Installed Python 3.13.5 in 5.77s
 + cpython-3.13.5-macos-aarch64-none
dae@mb:~/uv-aarch64-apple-darwin% ./python/cpython-3.13.5-macos-aarch64-none/bin/python
Python 3.13.5 (main, Jul  1 2025, 18:16:22) [Clang 20.1.4 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

No difference from what I gather.

(base) user@users-MacBook-Pro testanki % curl -LO https://github.com/astral-sh/uv/releases/download/0.7.19/uv-aarch64-apple-darwin.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15.6M  100 15.6M    0     0  5405k      0  0:00:02  0:00:02 --:--:-- 6031k
(base) user@users-MacBook-Pro testanki % tar xaf uv-aarch64-apple-darwin.tar.gz
tar: Ignoring option -a in mode -x
(base) user@users-MacBook-Pro testanki % cd uv-aarch64-apple-darwin 
(base) user@users-MacBook-Pro uv-aarch64-apple-darwin % UV_PYTHON_INSTALL_DIR=python ./uv python install 3.13.5
Installed Python 3.13.5 in 2.96s
 + cpython-3.13.5-macos-aarch64-none
(base) user@users-MacBook-Pro uv-aarch64-apple-darwin % ./python/cpython-3.13.5-macos-aarch64-none/bin/python
Python 3.13.5 (main, Jul  1 2025, 18:16:22) [Clang 20.1.4 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Interesting. This is an updated launcher built with 0.7.19. Does it work any better for you? You may need to remove your AnkiProgramFiles folder first.

Same thing.

Installed Python 3.13.5 in 2.85s
 + cpython-3.13.5-macos-aarch64-none
warning: Failed to patch the install name of the dynamic library for /Users/user/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13. This may cause issues when building Python native extensions.
error: Querying Python at `/Users/user/Library/Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none/bin/python3.13` failed with exit status signal: 9 (SIGKILL)
Install failed: Failed with code Some(2): /Applications/Anki.app/Contents/MacOS/uv sync --upgrade --managed-python --python 3.13.5

However, what just worked for me was:

  1. install uv with pip
  2. uninstall python 3.15 with uv
  3. rerun anki launcher (the experimental version dae provided)
  4. go into the “Application Support/AnkiProgramFiles/python/cpython-3.13.5-macos-aarch64-none” directory
  5. codesign both lib/libpython3.13.dylib and bin/python3.13 like this:
codesign -s - -f lib/libpython3.13.dylib
codesign -s - -f bin/python3.13

Then the launcher worked and Anki updated.

Now there is an add-on problem, idk if it’s related to what’s been happening.

Anki 25.07.1 (a83a6b59) (ao)
Python 3.13.5 Qt 6.8.1 PyQt 6.8.0
Platform: macOS-15.5-arm64-arm-64bit-Mach-O

Traceback (most recent call last):
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/progress.py", line 121, in handler
    func()
    ~~~~^^
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/main.py", line 231, in on_window_init
    fn()
    ~~^^
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/main.py", line 330, in setupProfile
    self.loadProfile()
    ~~~~~~~~~~~~~~~~^^
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/aqt/main.py", line 568, in loadProfile
    gui_hooks.profile_did_open()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/_aqt/hooks.py", line 4142, in __call__
    anki.hooks.runHook("profileLoaded")
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/user/Library/Application Support/AnkiProgramFiles/.venv/lib/python3.13/site-packages/anki/hooks.py", line 36, in runHook
    func(*args)
    ~~~~^^^^^^^
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/__init__.py", line 16, in tinyloader
    from . import external_js_editor_for_field
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/external_js_editor_for_field.py", line 10, in <module>
    from .dialog import ExtraWysiwygEditorForField
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/dialog.py", line 17, in <module>
    from .helpers import post_process_html
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/helpers.py", line 7, in <module>
    from .htmlmin import minify
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/htmlmin/__init__.py", line 28, in <module>
    from .main import minify, Minifier
  File "/Users/user/Library/Application Support/Anki2/addons21/805891399/htmlmin/main.py", line 28, in <module>
    import cgi
ModuleNotFoundError: No module named 'cgi'

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Advanced Browser ['874215009', 2024-10-27T10:20, 'None', '']
AnKing Note Types Easy Customization ['952691989', 2025-05-13T20:08, 'None', mod]
Anki Simulator ['817108664', 2023-11-06T12:26, 'None', '']
AnkiHub ['1322529746', 2025-07-04T10:52, 'None', '']
BetterSearch ['1052724801', 2025-04-06T17:13, 'None', mod]
Countdown To Events and Exams ['1143540799', 2022-06-27T07:50, 'None', '']
Custom Background Image and Gear Icon ['1210908941', 2025-06-22T09:27, 'None', mod]
FSRS Helper Postpone  Advance  Load Balance  Easy Days  Disperse Siblings ['759844606', 2025-06-14T23:58, 'None', '']
Review Heatmap ['1771074083', 2022-06-29T21:43, 'None', '']
The KING of Button Add-ons ['374005964', 2025-06-22T09:39, 'None', '']
UpToDate Addon ['utd_anki_addon', 2023-05-08T11:16, 'None', '']
extended editor for field for tables searchreplace ['805891399', 2023-07-31T10:12, 'None', mod]

===IDs of active AnkiWeb add-ons===
1052724801 1143540799 1210908941 1322529746 1771074083 374005964 759844606 805891399 817108664 874215009 952691989

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])


1 Like

I believe the root cause is something similar to this?