conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/download
Other
6.6k stars 335 forks source link

Installer fails if $HOME/micromamba exists, even if setting PREFIX #566

Open ndevenish opened 8 months ago

ndevenish commented 8 months ago

Solution to issue cannot be found in the documentation.

Issue

Freshly downloaded Miniforge. Found on regular machine, but easily reproducible in docker:

FROM ubuntu:latest
RUN apt-get update && apt-get install -y wget
RUN wget https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-Linux-x86_64.sh \
    && chmod +x Mambaforge-23.11.0-0-Linux-x86_64.sh \
    && touch $HOME/micromamba \
    && ./Mambaforge-23.11.0-0-Linux-x86_64.sh -p /opt/mamba -b

Gives:

PREFIX=/opt/mamba
Unpacking payload ...
info     libmamba ****************** Backtrace Start ******************
debug    libmamba Loading configuration
trace    libmamba Compute configurable 'create_base'
trace    libmamba Compute configurable 'no_env'
trace    libmamba Compute configurable 'no_rc'
trace    libmamba Compute configurable 'rc_files'
trace    libmamba Compute configurable 'root_prefix'
critical libmamba Could not use default 'root_prefix': /root/micromamba: File is not a directory.
info     libmamba ****************** Backtrace End ********************

I've removed it so my install can continue, but this surprised me.

Installed packages

na

Environment info

na
hmaarrfk commented 8 months ago

hmm curious. lets see if updating micromamba fixes things;

https://github.com/conda-forge/miniforge/pull/572

once those builds pass, i'll try to add the reproducer to our tests. Seems like a really strange behavior.

jaimergp commented 4 months ago

We might need to set MAMBA_ROOT_PREFIX in constructor as a workaround.