Mamba stopped working on Win10
Hey, community! Recently I've encountered such behavior of mamba:
No mapping for the Unicode character exists in the target multi-byte code page.
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1129, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 935, in exception_converter
raise e
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 928, in exception_converter
exit_code = _wrapped_main(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 886, in _wrapped_main
result = do_call(parsed_args, p)
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 756, in do_call
exit_code = update(args, parser)
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 646, in update
return install(args, parser, "update")
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\mamba.py", line 258, in install
init_api_context(use_mamba_experimental)
File "C:\ProgramData\Anaconda3\lib\site-packages\mamba\utils.py", line 197, in init_api_context
api_ctx = api.Context()
RuntimeError: No mapping for the Unicode character exists in the target multi-byte code page.
$ C:\ProgramData\Anaconda3\Scripts\mamba upgrade --all -c conda-forge
I do not understand where it came from. Just updated to newer version. I've been working with mamba 1 year and this is first time when I see such thing. Please, can you recommend me what to do? I've tried to conda remove / uninstall mamba - but no luck (could not uninstall, very long time of solving). I've tried to re-install - no luck (it just says that all needed packages is there, but mamba throws the same error) . Need your help.
I use:
mamba 0.27.0 conda 22.9.0 Win10 Python 3.9.13 in base (3.10.* in other envs)
The easiest way to reinstall would be to remove Conda entirely (delete all the folders from your computer) and then install Mambaforge.
The easiest way to reinstall would be to remove Conda entirely (delete all the folders from your computer) and then install Mambaforge.
How can I save my env to use it after re-install? Because I use it for work... I could delete base, but not working env... I hope that there is another way to get out of this situation.
I'm not saying you should do this but you can try something like
mamba env export -n yourenv --from-history > environment.yml
which will create an environment.yml file from the explicitly installed packages in your env. Then you can just use mamba env create -f environment.yml to reinstall the env. It is good practice to be able to reproduce your env anyways, so not only using mamba install somepkg, but having an environment.yml.
Thank you for advice! I have not done this before. Tried to create yml file but could not even locate it on Win10. Where mamba stores such files?
You use the command above to create the yml file.
Where is this file stored on Win10? I could not find it and check if it created? Still I want to understand the nature of the error in my first post. So If someone can explain why it happen to my system and what should I do to have no errors like: "No mapping for the Unicode character exists in the target multi-byte code page." - will be very grateful!
It is stored in the folder where you execute the command.
Assuming that you are using bash:
pwd # eg. /C/Users/abc/
mamba env export -n yourenv --from-history > environment.yml # /C/Users/abc/environment.yml
I guess it works the same way in PowerShell but I'm not sure. See eg. https://askubuntu.com/questions/420981/how-do-i-save-terminal-output-to-a-file
I've just deleted mamba and returned to conda on WIn10, which works slow, but works... Until it's understood what happed to mamba with recent updates...