Anki won't open/start at all, fatal python error

I recently installed the most recent version of Anki on my computer( 64x, windows 10 Home) But whenever I click on the programme, the loading symbol appears for a couple of seconds, then disappears, and then nothing happens. The programme won’t start, and doesn’t give an error either. When looking at the command prompt, this is what it says:

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00005298 (most recent call first):

Does anyone know what I need to do in order for it to work? I already followed the debugging steps (restarting, updating, etc) I have never used the programme before and do not have an account or any folders/cards yet. Thank you in advance.

If it happens with the latest version (2.1.47) from https://apps.ankiweb.net/, try the latest beta version (2.1.48+rc2) from https://betas.ankiweb.net/ (Packaged Builds).

If the same error happens, maybe instead of installing, maybe try to export the contents of the .exe file with 7-Zip File Manager.

Also, maybe try Running from Python.

Also, maybe post the full error message, i.e. [3832] LOADER: Initializing python and so on. For example,

In this case, the error was artificially created by manually removing base_library.zip from C:\Program Files\Anki, but in your case it might be something else and some output probably will be different.

Thanks so much! Will be trying these. This is the full error message:

cd \program files\anki & anki-console

[2588] PyInstaller Bootloader 3.x
[2588] LOADER: executable is C:\Program Files\Anki\anki-console.exe
[2588] LOADER: homepath is C:\Program Files\Anki
[2588] LOADER: _MEIPASS2 is NULL
[2588] LOADER: archivename is C:\Program Files\Anki\anki-console.exe
[2588] LOADER: C:\Program Files\Anki\anki-console.exe contains a digital signature
[2588] LOADER: No need to extract files to run; setting extractionpath to homepath
[2588] LOADER: SetDllDirectory(C:\Program Files\Anki)
[2588] LOADER: Already in the child - running user’s code.
[2588] LOADER: Python library: C:\Program Files\Anki\python38.dll
[2588] LOADER: Loaded functions from Python library.
[2588] LOADER: Manipulating environment (sys.path, sys.prefix)
[2588] LOADER: sys.prefix is C:\Program Files\Anki
[2588] LOADER: Pre-init sys.path is C:\Program Files\Anki\base_library.zip;C:\Program Files\Anki
[2588] LOADER: Setting runtime options
[2588] LOADER: Initializing python
Python path configuration:
PYTHONHOME = ‘C:\Program Files\Anki’
PYTHONPATH = (not set)
program name = ‘C:\Program Files\Anki\anki-console.exe’
isolated = 0
environment = 0
user site = 0
import site = 0
sys._base_executable = ‘C:\Program Files\Anki\anki-console.exe’
sys.base_prefix = ‘’
sys.base_exec_prefix = ‘’
sys.executable = ‘C:\Program Files\Anki\anki-console.exe’
sys.prefix = ‘’
sys.exec_prefix = ‘’
sys.path = [
‘C:\Program Files\Anki\base_library.zip’,
‘C:\Program Files\Anki’,
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00005298 (most recent call first):

Thank you but it looks identical to mine and Google doesn’t seem to provide anything helpful. Maybe check that Windows Update don’t have any updates to install, restart your PC and try Running Anki from Python.

1 Like