Broken environment soon after fresh install of Miniforge3 23.3.1-1

I’ve just installed a fresh Miniforge3-Linux-x86_64.sh (latest release which is 23.3.1-1 from the installer welcome message).

Then, only after a few updates (see below), I’m unable to install classic packages (matplotlib).

I’m on Ubuntu 22.04. Here are the steps I took, as far as my bash history remembers:

  1. install :bash Miniforge3-Linux-x86_64.sh

  2. remove default channel from ~/.condarc (since I add previously installed miniconda, but wanted a fresh clean install)

  3. update to Python 3.11 in base environment (despite some advice not to do so?): conda install python=3.11

    • remark: in fact my bash history says I did this before step 2 (removing default channel). However, my conda list says I’m not having an issue of mixing conda-forge and default channel (which happened to me in the past…)
  4. update all existing package conda update --all

  5. install classic packages: conda install scipy matplotlib jupyterlab pandas statsmodels

Now, decomposing step 5 into smaller steps, I was able to install numpy and scipy alone, but not matplotlib.

Error message is

$ conda install matplotlib 
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.

ResolvePackageNotFound: 
  - conda==23.3.1

Also, I get strange warning about the existence of a more recent version of conda (Release 23.9.0 · conda/conda · GitHub released last week), but I can’t get it to install.

Here is the full list of installed package. Maybe a strange this is the version of conda-libmamba-solver (23.9.1) which is more recent than conda (23.7.4).

Any ideas on what I did wrong. Or is it an issue related to the ongoing transition to mamba solver in conda?

$ conda list
# packages in environment at /home/pierre/Programmes/bin/miniforge23:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
boltons                   23.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py311hb755f60_1    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.19.1               hd590300_0    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py311hb3a22ac_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.7.4          py311h38be061_0    conda-forge
conda-libmamba-solver     23.9.1             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
cryptography              41.0.4          py311h63ff55d_0    conda-forge
fmt                       10.1.1               h00ab1b0_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py311h38be061_3    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libarchive                3.7.2                h039dbb9_0    conda-forge
libblas                   3.9.0           18_linux64_openblas    conda-forge
libcblas                  3.9.0           18_linux64_openblas    conda-forge
libcurl                   8.3.0                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_2    conda-forge
libgfortran-ng            13.2.0               h69a702a_2    conda-forge
libgfortran5              13.2.0               ha4646dd_2    conda-forge
libgomp                   13.2.0               h807b86a_2    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
liblapack                 3.9.0           18_linux64_openblas    conda-forge
libmamba                  1.5.1                hfcfce90_1    conda-forge
libmambapy                1.5.1           py311hf2555c7_1    conda-forge
libnghttp2                1.52.0               h61bc06f_0    conda-forge
libnsl                    2.0.0                hd590300_1    conda-forge
libopenblas               0.3.24          pthreads_h413a1c8_0    conda-forge
libsolv                   0.7.25               hfc55251_0    conda-forge
libsqlite                 3.43.0               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_2    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxml2                   2.11.5               h232c23b_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mamba                     1.5.1           py311h3072747_1    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
numpy                     1.26.0          py311h64a7726_0    conda-forge
openssl                   3.1.3                hd590300_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.4           py311h459d7ec_2    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.11.5          hab00c5b_0_cpython    conda-forge
python_abi                3.11                    4_cp311    conda-forge
readline                  8.2                  h8228510_1    conda-forge
reproc                    14.2.4.post0         hd590300_0    conda-forge
reproc-cpp                14.2.4.post0         h59595ed_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.17.33         py311h459d7ec_1    conda-forge
ruamel.yaml.clib          0.2.7           py311h459d7ec_2    conda-forge
scipy                     1.11.3          py311h64a7726_0    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h2797004_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.5              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml-cpp                  0.8.0                h59595ed_0    conda-forge
zstandard                 0.21.0          py311haa97af0_1    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Can you try with the libmamba solver enabled?

$ conda config --set solver libmamba

Also, removing the channels from condarc is going to cause the solver to mix conda-forge and defaults, which is not a good idea given the risk of ending up in an ABI incompatible setup. I would stick to a single channel.

Thanks for the feedback. Switching to the libmamba solver indeed unlock the installation of matplot (and more)!

Now, I still get a warning about the existence of a newer version of conda:

==> WARNING: A newer version of conda exists. <==
    current version: 23.7.4
    latest version: 23.9.0

However, I cannot get it to update. The recommended action $ conda update -n base -c conda-forge conda ends up with:

# All requested packages already installed.

Finally, I didn’t understand your last point on .condarc, because my purpose when removing the line with the default channel from this config file was precisely to avoid mixing channels. After removal, my .condarc is:

channels:
  - conda-forge
channel_priority: strict
solver: libmamba

→ is this fine or there another place where the default channel is sneaklily hiding?

You’re not alone – I’ve been having this trouble for a good while yet – even with a totally fresh miniforge or miniconda.

See my recently posted question :frowning:

Thanks for the feedback.

I’m pasting the reference to that other discussion which confirms the current (~sept-oct 2023 ?) incompatibility between mamba and the latest conda, but it seems it should be fixed soon: Updating miniconda with conda-forge conda and priority: strict - #7 by jaimergp

In my latest $ conda update --all today, the conda update problem got fixed:

The following packages will be UPDATED:

  conda                              23.7.4-py311h38be061_0 --> 23.9.0-py311h38be061_0 
  ...
  libmamba                                 1.5.1-had39da4_2 --> 1.5.2-had39da4_0 
  libmambapy                          1.5.1-py311hf2555c7_2 --> 1.5.2-py311hf2555c7_0 
  ...
  mamba                               1.5.1-py311h3072747_2 --> 1.5.2-py311h3072747_0 
  ...
1 Like