When trying to upgrade from rc3 to the latest 24.04, I get the following error (Windows 10):
Update: I was unable to delete rc3 Anki files using the standard Windows uninstallation tools, so I had to delete them manually. Then I successfully installed 24.04.
When anki.exe starts, mpv.exe is also started. It is used for audio-visual playback.
If Anki crashes unexpectedly, then mpv.exe continues to run in the background. If you then try to install a new version, it tries to install mpv.exe along with it, but it can’t replace an .exe file if that program is currently running.
(Ironically, the “new” version of mpv.exe being installed is often byte-for-byte identical to the existing one)
The solution is to open Task Manager (Ctrl-Shift-Esc shortcut will do it), search for “mpv” in the text input box at the top of that window, then right-click on the line containing mpv and select “End Task”. After that, the install will work.
A long-term solution would be to rewrite Anki to call mpv’s functionality through an API rather than running it as a separate process.