Issues When Installing Openpyxl

Viewed 493

I was trying to install openpyxl and I got the following error message:

Traceback (most recent call last): File "C:\Users\XXXXXXX\anaconda3\Scripts\mamba-script.py", line 10, in sys.exit(main()) File "C:\Users\XXXXXX\anaconda3\lib\site-packages\mamba\mamba.py", line 848, in main from conda.common.compat import ensure_text_type, init_std_stream_encoding ImportError: cannot import name 'init_std_stream_encoding' from 'conda.common.compat' (C:\Users\XXXXXX\anaconda3\lib\site-packages\conda\common\compat.py

Can someone assist me on what I did wrong?

1 Answers

This is a copy of an answer to a similar question here, based on an answer/solution by @szymonos:

So I was installing mamba from conda-forge channel using command: conda install -n base -c conda-forge mamba, but on the other hand, I had a script for updating conda environment using mamba update --all, but it was using the default channel and after that, mamba became corrupted with AttributeError: module 'libmambapy' has no attribute 'QueryFormat'. Changing update command to mamba update -c conda-forge -all fixed the issue.

Related