Can't open anki in windows. Anki is searching for python38.dll in the wrong place

Hi! I installed the newest Anki version for windows but i always get an error message when i try to open the program. “error loading python.dll”. The windows console gave me the following text:

C:\Users\olive>cd \program files\anki & anki-console
[5816] PyInstaller Bootloader 3.x
[5816] LOADER: executable is C:\Program Files\Anki\anki-console.exe
[5816] LOADER: homepath is C:\Program Files\Anki
[5816] LOADER: _MEIPASS2 is C:\Users\olive\AppData\Local\Temp\mei
[5816] LOADER: archivename is C:\Program Files\Anki\anki-console.exe
[5816] LOADER: C:\Program Files\Anki\anki-console.exe contains a digital signature
[5816] LOADER: SetDllDirectory(C:\Users\olive\AppData\Local\Temp\mei)
[5816] LOADER: Already in the child - running user’s code.
[5816] LOADER: Python library: C:\Users\olive\AppData\Local\Temp\mei\python38.dll
Error loading Python DLL ‘C:\Users\olive\AppData\Local\Temp\mei\python38.dll’.
LoadLibrary: Das angegebene Modul wurde nicht gefunden.

It seems like Anki searches for python38.dll in “C:\Users\olive\AppData\Local\Temp\mei” but i can’t find that folder on my computer.
In “C:\Program Files\Anki” i CAN find a python38.dll.
How can i make Anki search for python in the correct folder?
I have the newest windows version installed.

I appreciate any help!

On your machine:

[5816] LOADER: _MEIPASS2 is C:\Users\olive\AppData\Local\Temp\mei

On my machine:

[10024] LOADER: _MEIPASS2 is NULL

It looks like it’s an environment variable. Maybe another app created this variable in the past.

Try to run anki-console again from cmd.exe but with these two lines:

set _MEIPASS2=
cd \program files\anki & anki-console

If it works and Anki can be opened, press Win and search for “environ” (“Edit the system environment variables”) - Environment Variables, look for “_MEIPASS2” in User or System variables and delete it. If nothing is found, maybe restart Windows.

2 Likes

This worked!

I found and deleted “MEIPASS2” environment variable and can now open anki without using cmd.exe.

Thanks a lot:)