mamba init error: AttributeError: 'Namespace' object has no attribute 'no_user'
Asked Answered
S

1

6
  • Running mamba inside conda base.
  • mamba installed via mambaforge but OUTSIDE conda base. (??)
  • python 3.10.8

From within conda base, running mamba init gives the following error:

`user@pop-os:~$ mamba init
mamba (1.2.0) supported by @QuantStack


'Namespace' object has no attribute 'no_user'


    Traceback (most recent call last):
      File "/home/user/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1132, in __call__
        return func(*args, **kwargs)
      File "/home/user/miniconda3/lib/python3.10/site-packages/mamba/mamba.py", line 936, in exception_converter
        raise e
      File "/home/user/miniconda3/lib/python3.10/site-packages/mamba/mamba.py", line 929, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
      File "/home/user/miniconda3/lib/python3.10/site-packages/mamba/mamba.py", line 887, in _wrapped_main
        result = do_call(parsed_args, p)
      File "/home/user/miniconda3/lib/python3.10/site-packages/mamba/mamba.py", line 758, in do_call
        exit_code = shell_init(args)
      File "/home/user/miniconda3/lib/python3.10/site-packages/mamba/mamba_shell_init.py", line 87, in shell_init
        if args.no_user:
    AttributeError: 'Namespace' object has no attribute 'no_user'
    
    
    `$ /home/user/miniconda3/condabin/mamba init``

Additional:


`$ /home/user/miniconda3/condabin/mamba init`

  environment variables:
                 CIO_TEST=<not set>
                CONDA_EXE=/home/user/miniconda3/bin/conda
         CONDA_PYTHON_EXE=/home/user/miniconda3/bin/python
               CONDA_ROOT=/home/user/miniconda3
              CONDA_SHLVL=0
           CURL_CA_BUNDLE=<not set>
            DEFAULTS_PATH=/usr/share/gconf/pop.default.path
               LD_PRELOAD=<not set>
           MANDATORY_PATH=/usr/share/gconf/pop.mandatory.path
                     PATH=/home/user/miniconda3/condabin:/usr/local/sbin:/usr/local/b
                          in:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
                          :/snap/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
               WINDOWPATH=2

     active environment : None
            shell level : 0
       user config file : /home/user/.condarc
 populated config files : /home/user/.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.8.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.34=0
                          __linux=5.19.0=0
                          __unix=0=0
       base environment : /home/user/miniconda3  (writable)
      conda av data dir : /home/user/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : conda.anaconda.org/conda-forge/linux-64
                          conda.anaconda.org/conda-forge/noarch
                          conda.anaconda.org/bioconda/linux-64
                          conda.anaconda.org/bioconda/noarch
                          repo.anaconda.com/pkgs/main/linux-64
                          repo.anaconda.com/pkgs/main/noarch
                          repo.anaconda.com/pkgs/free/linux-64
                          repo.anaconda.com/pkgs/free/noarch
                          repo.anaconda.com/pkgs/r/linux-64
                          repo.anaconda.com/pkgs/r/noarch
                          conda.anaconda.org/r/linux-64
                          conda.anaconda.org/r/noarch
          package cache : /home/user/miniconda3/pkgs
                          /home/user/.conda/pkgs
       envs directories : /home/user/miniconda3/envs
                          /home/user/.conda/envs
               platform : linux-64
             user-agent : conda/23.3.1 requests/2.28.2 CPython/3.10.8 Linux/5.19.0-051900-generic pop/21.10 glibc/2.34
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False`

Initialize mamba using miniconda3

Sympathy answered 13/4, 2023 at 0:20 Comment(0)
B
1

I encountered the same problem. The reason might be that you started from scratch but didn't install mamba from Mambaforge. This can be solved by a full installation of mamba from Mambaforge, as this will run the mamba init after the installation of mamba.

Beauvais answered 25/5, 2023 at 10:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.