Skip to content

Mamba 2.0 does not allow creating an environment prefix in place of an existing directory #3845

@bernt-matthias

Description

@bernt-matthias

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

#2402

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

If there an existing folder X I get for mamba >= 2.0:

mamba create -p /usr/local/
error    libmamba Non-conda folder exists at prefix                                                                                                                   
critical libmamba Aborting.          

and for Mamba < 2.0

WARNING: A directory already exists at the target location '/usr/local'
but it is not a conda environment.

conda behaves like mamba < 2.0

I'm using the latest miniforge container. Mamba >=2 is installed with conda in the container.

see also #2402

mamba info / micromamba info

active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /root/.condarc
 populated config files : /opt/conda/.condarc
          conda version : 25.1.1
    conda-build version : not installed
         python version : 3.12.8.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=25.1.1=0
                          __glibc=2.31=0
                          __linux=6.11.0=0
                          __unix=0=0
       base environment : /opt/conda  (writable)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /opt/conda/pkgs
                          /root/.conda/pkgs
       envs directories : /opt/conda/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/25.1.1 requests/2.32.3 CPython/3.12.8 Linux/6.11.0-17-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/25.1.1 libmambapy/2.0.5
                UID:GID : 0:0
             netrc file : None
           offline mode : False

Logs

environment.yml

~/.condarc

Metadata

Metadata

Assignees

No one assigned

    Labels

    type::bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions