conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
5.76k stars 306 forks source link

Getting mamba command not found with Homebrew installation #552

Open ccyhui opened 4 months ago

ccyhui commented 4 months ago

Solution to issue cannot be found in the documentation.

Issue

I checked the README and installed miniforge with brew install miniforge. After installation, I tried to create an environment with mamba create -n testenv and I get zsh: command not found: mamba. I tried where mamba and I got mamba not found. Not sure if I should use Mambaforge distribution? But the Mamba Installation Guide suggested to use Miniforge unless the older version of Mamba is needed.

Installed packages

# packages in environment at /opt/homebrew/Caskroom/miniforge/base:
#
# Name                    Version                   Build  Channel
archspec                  0.2.2              pyhd8ed1ab_0    conda-forge
boltons                   23.1.1             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310h1253130_1    conda-forge
bzip2                     1.0.8                h93a5062_5    conda-forge
c-ares                    1.24.0               h93a5062_0    conda-forge
ca-certificates           2023.11.17           hf0a4a13_0    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310hdcd7c05_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.11.0         py310hbe9552e_1    conda-forge
conda-libmamba-solver     23.12.0            pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
distro                    1.8.0              pyhd8ed1ab_0    conda-forge
fmt                       10.1.1               h6aa02a4_1    conda-forge
icu                       73.2                 hc8870d7_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310hbe9552e_3    conda-forge
krb5                      1.21.2               h92f50d5_0    conda-forge
libarchive                3.7.2                hcacb583_1    conda-forge
libcurl                   8.5.0                h2d989ff_0    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h93a5062_2    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libiconv                  1.17                 h0d3ecfb_2    conda-forge
libmamba                  1.5.5                h0a6dc31_0    conda-forge
libmambapy                1.5.5           py310h3812fd7_0    conda-forge
libnghttp2                1.58.0               ha4dd798_1    conda-forge
libsolv                   0.7.27               h9e231a4_0    conda-forge
libsqlite                 3.44.2               h091b4b1_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libxml2                   2.12.3               h0d0cfa8_0    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
lz4-c                     1.9.4                hb7217d7_0    conda-forge
lzo                       2.10              h642e427_1000    conda-forge
mamba                     1.5.5           py310ha5d4528_0    conda-forge
menuinst                  2.0.1           py310hbe9552e_0    conda-forge
ncurses                   6.4                  h463b476_2    conda-forge
openssl                   3.2.0                h0d3ecfb_1    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py310h2aa6e3c_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.13         h2469fbe_0_cpython    conda-forge
python_abi                3.10                    4_cp310    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
reproc                    14.2.4.post0         h93a5062_1    conda-forge
reproc-cpp                14.2.4.post0         h965bd2d_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.18.5          py310hd125d64_0    conda-forge
ruamel.yaml.clib          0.2.7           py310h2aa6e3c_2    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml-cpp                  0.8.0                h13dd4ca_0    conda-forge
zstandard                 0.22.0          py310h6289e41_0    conda-forge
zstd                      1.5.5                h4f39d0f_0    conda-forge

Environment info

active environment : None
       user config file : /Users/calvinhui/.condarc
 populated config files : /opt/homebrew/Caskroom/miniforge/base/.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.3.1=0
                          __unix=0=0
       base environment : /opt/homebrew/Caskroom/miniforge/base  (writable)
      conda av data dir : /opt/homebrew/Caskroom/miniforge/base/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 : /opt/homebrew/Caskroom/miniforge/base/pkgs
                          /Users/calvinhui/.conda/pkgs
       envs directories : /opt/homebrew/Caskroom/miniforge/base/envs
                          /Users/calvinhui/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.10.13 Darwin/23.3.0 OSX/14.3.1 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.5
                UID:GID : 501:20
             netrc file : None
           offline mode : False
fxcoudert commented 4 months ago

You could open a pull request at homebrew-cask to add, after this line: https://github.com/Homebrew/homebrew-cask/blob/ec3676bc89f158f7d06c96e3cd1b5dfb41dbe0ed/Casks/m/miniforge.rb#L27

the same thing for the mamba executable, i.e.:

binary "#{caskroom_path}/base/condabin/conda"
binary "#{caskroom_path}/base/condabin/mamba"
ccyhui commented 4 months ago

Thank you, @fxcoudert. I've tried conda init zsh after installing miniforge with homebrew and this also worked.