LookupError('unknown encoding: utf-16-le') on Windows 11 with Anaconda3-2024.06-1-Windows-x86_64.exe

When performing a complete uninstall of my anaconda installation (update via interface didn’t work) and re-install using Anaconda3-2024.06-1-Windows-x86_64.exe (SHA256:45EEF9132B70E3D5A493C26429DDB4E2C9278A32097FD4BC729F860685633A3B) , I get the error below when doing something simple like conda install -c conda-forge mamba

ERROR conda.core.link:_execute(950): An error occurred while installing package ‘conda-forge::fmt-10.2.1-h181d51b_0’.
Rolling back transaction: done

LookupError('unknown encoding: utf-16-le')
()
[Errno 2] No such file or directory: 'F:\\Users\\luc\\ana3\\conda-meta\\ca-certificates-2024.3.11-haa95532_0.json'
[Errno 2] No such file or directory: 'F:\\Users\\luc\\ana3\\conda-meta\\certifi-2024.6.2-py312haa95532_0.json'
[Errno 2] No such file or directory: 'F:\\Users\\luc\\ana3\\conda-meta\\conda-24.5.0-py312haa95532_0.json'

I tried many things such as setting the environment variable to utf-8, but that didn’t help.

PYTHONIOENCODING=utf-8
PYTHONUTF8=1

The only thing that worked so far is again uninstalling everything, deleting the .conda and .anaconda folder in my user folder (C:\Users<username>) and starting from an older version of the anaconda installation file (Anaconda3-2024.02-1-Windows-x86_64.exe; SHA256: 087C633E355BC709222AD9E0DBAD77ABEED84F7E06DBDBECAE84BA8B3660429E) and perform the upgrades via the GUI to the latest version.

Did other people experience this, what causes this and how was it solved?

Thanks for your feedback,

Luc

Hi Luc, if it still matters: I ran into the same problem and solved it in a dirtier way. The cause of it, in my case, seemed to be an update of openssl to 3.4.1 on Windows 11, producing the error message:

ERROR conda.core.link:_execute(938): An error occurred while installing package ‘conda-forge::openssl-3.4.1-ha4e3fda_0’.

If you ignore this dependency using the --no-deps argument in conda, it may install and work with the default 3.0.16.