Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mamba clean crash #3044

Closed
3 tasks done
ThomasHezard opened this issue Dec 6, 2023 · 12 comments
Closed
3 tasks done

mamba clean crash #3044

ThomasHezard opened this issue Dec 6, 2023 · 12 comments

Comments

@ThomasHezard
Copy link

ThomasHezard commented Dec 6, 2023

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Mambaforge or latest Miniforge

Search tried in issue tracker

clean, crash

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

The command mamba clean ends with error for all the options I tried:

  • mamba clean -a
  • mamba clean -i
  • mamba clean -p
  • mamba clean -t
  • mamba clean -l

The error is always the same:
No module named 'conda.cliconda'
followed by an error report (see below)

Problem is the same with or without an activated environement.

conda clean works fine with all options.

My miniforge3 install is only a few days old, no plugins, I just created one simple env and and run mamba update conda mamba once.

mamba info / micromamba info

mamba version : 1.5.4
     active environment : None
            shell level : 0
       user config file : /Users/thomashezard/.condarc
 populated config files : /Users/thomashezard/opt/miniforge3/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=23.11.0=0
                          __osx=14.1.1=0
                          __unix=0=0
       base environment : /Users/thomashezard/opt/miniforge3  (writable)
      conda av data dir : /Users/thomashezard/opt/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/thomashezard/opt/miniforge3/pkgs
                          /Users/thomashezard/.conda/pkgs
       envs directories : /Users/thomashezard/opt/miniforge3/envs
                          /Users/thomashezard/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Darwin/23.1.0 OSX/14.1.1 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.4
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Logs

NB: I purposefully removed some sensitive env variables, but I'm almost 100% sure these have nothing to do with the issue here.

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 956, in exception_converter
        raise e
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 949, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 895, in _wrapped_main
        result = do_call(parsed_args, p)
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 758, in do_call
        exit_code = clean(args, parser)
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/site-packages/mamba/mamba.py", line 701, in clean
        module = import_module("conda.cli" + relative_mod, __name__.rsplit(".", 1)[0])
      File "/Users/thomashezard/opt/miniforge3/lib/python3.10/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'conda.cliconda'

`$ /Users/thomashezard/opt/miniforge3/bin/mamba clean -a`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/Users/thomashezard/opt/miniforge3/bin/conda
             CONDA_PREFIX=/Users/thomashezard/opt/miniforge3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/Users/thomashezard/opt/miniforge3/bin/python
               CONDA_ROOT=/Users/thomashezard/opt/miniforge3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
        DYLD_LIBRARY_PATH=/Users/thomashezard/usr/lib:/opt/homebrew/lib:
                 INFOPATH=/opt/homebrew/share/info:
               LD_PRELOAD=<not set>
                  MANPATH=/Users/thomashezard/bash_scripts/git-
                          subrepo/man:/opt/homebrew/share/man::
                     PATH=/Users/thomashezard/opt/miniforge3/bin:/Users/thomashezard/opt/google-
                          cloud-sdk/bin:/Users/thomashezard/opt/miniforge3/condabin:/Users/thoma
                          shezard/Library/Android/sdk/cmdline-tools/9.0/bin:/Users/thomashezard/
                          Library/Android/sdk/emulator:/Users/thomashezard/Library/Android/sdk/t
                          ools:/Users/thomashezard/Library/Android/sdk/tools/bin:/Users/thomashe
                          zard/Library/Android/sdk/platform-tools:/Users/thomashezard/.cargo/bin
                          :/Users/thomashezard/bash_scripts/git-subrepo/lib:/Users/thomashezard/
                          .pyenv/shims:/Users/thomashezard/.pyenv/bin:/Users/thomashezard/.jenv/
                          shims:/Users/thomashezard/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew
                          /sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/
                          sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap
                          /usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/boots
                          trap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstr
                          ap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/VMware F
                          usion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Use
                          rs/thomashezard/.maestro/bin:/Users/thomashezard/usr/bin:/usr/local/bi
                          n:/Users/thomashezard/bash_scripts:/Users/thomashezard/opt/depot_tools
                          :/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/User
                          s/thomashezard/Library/Application Support/JetBrains/Toolbox/scripts
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : /Users/thomashezard/opt/miniforge3
            shell level : 1
       user config file : /Users/thomashezard/.condarc
 populated config files : /Users/thomashezard/opt/miniforge3/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=23.11.0=0
                          __osx=14.1.1=0
                          __unix=0=0
       base environment : /Users/thomashezard/opt/miniforge3  (writable)
      conda av data dir : /Users/thomashezard/opt/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/thomashezard/opt/miniforge3/pkgs
                          /Users/thomashezard/.conda/pkgs
       envs directories : /Users/thomashezard/opt/miniforge3/envs
                          /Users/thomashezard/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Darwin/23.1.0 OSX/14.1.1 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.4
                UID:GID : 501:20
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

environment.yml

No response

~/.condarc

no .condarc for now
@mbargull
Copy link
Contributor

mbargull commented Dec 6, 2023

Reported in #3033 (comment) .
Fixed with #3040 .

@rohit-guitar
Copy link

This is still happening to me inside Docker while building the container. Mamba version 1.5.4, conda 23.11.0

@ThomasHezard
Copy link
Author

@rohit-guitar
Fix #3040 cited above has been merged but not released yet. Should be included in next release I guess.

sphuber pushed a commit to aiidateam/aiida-core that referenced this issue Dec 8, 2023
The mamba versions `1.5.3` and `1.5.4` have an issue that will fail the docker
build, see mamba-org/mamba#3044.
Pining the version to `1.5.2` until the problem is fixed upstream.
@ReimarBauer
Copy link

ReimarBauer commented Dec 8, 2023

On all systems we have mamba 1.5.4,

I have the same problem in our cli for linux and mac but
it happens also on windows, but there somehow magical it can continue.

Looking for: ['mss', 'python']


Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
No module named 'conda.cliconda'

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\Users\runneradmin\miniforge\lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "C:\Users\runneradmin\miniforge\lib\site-packages\mamba\mamba.py", line 956, in exception_converter
        raise e
      File "C:\Users\runneradmin\miniforge\lib\site-packages\mamba\mamba.py", line 949, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
      File "C:\Users\runneradmin\miniforge\lib\site-packages\mamba\mamba.py", line 895, in _wrapped_main
        result = do_call(parsed_args, p)
      File "C:\Users\runneradmin\miniforge\lib\site-packages\mamba\mamba.py", line 758, in do_call
        exit_code = clean(args, parser)
      File "C:\Users\runneradmin\miniforge\lib\site-packages\mamba\mamba.py", line 701, in clean
        module = import_module("conda.cli" + relative_mod, __name__.rsplit(".", 1)[0])
      File "C:\Users\runneradmin\miniforge\lib\importlib\__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
                          Server\140\DTS\Binn;C:\Program Files\Microsoft SQL
                          Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn
                          ;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bi
                          n;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program
                          Files\TortoiseSVN\bin;C:\Program
                          Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-
                          maven-3.8.7\bin;C:\Program Files\Microsoft Service
                          Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service
                          Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program
                          Files\nodejs;C:\Program Files\Git\cmd;C:\Program
                          Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program
                          Files\GitHub CLI;c:\tools\php;C:\Program Files
                          (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program
                          Files\Amazon\SessionManagerPlugin\bin;C:\Program
                          Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL
                          Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.
                          dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppD
                          ata\Local\Microsoft\WindowsApps;C:\Users\runneradmin\Miniforge\condabi
                          n
PSMODULEANALYSISCACHEPATH=C:\PSModuleAnalysisCachePath\ModuleAnalysisCache
             PSMODULEPATH=C:\\Modules\azurerm_2.1.0;C:\\Modules\azure_2.1.0;C:\Users\packer\Docu
                          ments\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Mod
                          ules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program
                          Files\Microsoft SQL Server\130\Tools\PowerShell\Modules\
       REQUESTS_CA_BUNDLE=<not set>
        SELENIUM_JAR_PATH=C:\selenium\selenium-server.jar
            SSL_CERT_FILE=<not set>

     active environment : mssenv
    active env location : C:\Users\runneradmin\miniforge\envs\mssenv
            shell level : 1
       user config file : C:\Users\runneradmin\.condarc
 populated config files : C:\Users\runneradmin\miniforge\.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.10.12.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=x86_64
                          __conda=23.11.0=0
                          __win=0=0
       base environment : C:\Users\runneradmin\miniforge  (writable)
      conda av data dir : C:\Users\runneradmin\miniforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\runneradmin\miniforge\pkgs
                          C:\Users\runneradmin\.conda\pkgs
                          C:\Users\runneradmin\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\runneradmin\miniforge\envs
                          C:\Users\runneradmin\.conda\envs
                          C:\Users\runneradmin\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.20348 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.4
          administrator : True
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

mss                       8.3.2           py310h5588dad_0    conda-forge
Done! To start msui from the MSS Software: Press the Windows button, type in "msui" and press enter.
Alternatively:
1. Activate your mamba environment with this command: "mamba activate mssenv"
2. Start msui with this command: "msui"
Press any key to continue . . . 

@ReimarBauer
Copy link

Workaround

instead of mamba clean --all -y we can use conda clean --all -y

@Shamik-07
Copy link

Shamik-07 commented Dec 11, 2023

Workaround

instead of mamba clean --all -y we can use conda clean --all -y

yes this certainly works but the error is an upstream error for Linux systems.

@ReimarBauer
Copy link

It fails also on Windows. Somehow it continues there which I assume is not correct. Crashes or Exceptions should behave similiar.

@JohanMabille
Copy link
Member

I've released mamba 1.5.5 with the fix included.

@Shamik-07
Copy link

I've released mamba 1.5.5 with the fix included.

Will check it once we can update it via mamba update -n base mamba

@ReimarBauer
Copy link

I've released mamba 1.5.5 with the fix included.

This works for us. Thx.

@Shamik-07
Copy link

Shamik-07 commented Dec 12, 2023

@ThomasHezard maybe you can close this issue, if it's fixed for you.

@ThomasHezard
Copy link
Author

Fixed with the 1.5.5 release, many thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants