conda-forge / miniforge

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

warning libmamba Could not parse state file: Could not load cache state #479

Closed a-munoz-rojas closed 10 months ago

a-munoz-rojas commented 10 months ago

Solution to issue cannot be found in the documentation.

Issue

I get the following warning when installing any package using mamba:

warning  libmamba Could not parse state file: Could not load cache state: [json.exception.type_error.302] type must be string, but is null

I think it's related to this issue (https://github.com/conda/conda-libmamba-solver/issues/145), which makes me think the base mamba that comes with the Mambaforge installer needs to upgraded?

Installed packages

# packages in environment at /Users/andres/mambaforge:
#
# Name                    Version                   Build  Channel
brotli-python             1.0.9           py310h0f1eb42_9    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
c-ares                    1.19.1               hb547adb_0    conda-forge
ca-certificates           2023.5.7             hf0a4a13_0    conda-forge
certifi                   2023.5.7           pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h2399d43_3    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.1.0          py310hbe9552e_0    conda-forge
conda-package-handling    2.0.2              pyh38be061_0    conda-forge
conda-package-streaming   0.8.0              pyhd8ed1ab_0    conda-forge
cryptography              41.0.2          py310hdd3b5e7_0    conda-forge
fmt                       9.1.0                hffc8910_0    conda-forge
icu                       72.1                 he12128b_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
krb5                      1.21.1               h92f50d5_0    conda-forge
libarchive                3.6.2                h82b9b87_1    conda-forge
libcurl                   8.1.2                hc52a3a8_1    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h642e427_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libiconv                  1.17                 he4db4b2_0    conda-forge
libmamba                  1.4.2                h7d1d596_0    conda-forge
libmambapy                1.4.2           py310h34b6e76_0    conda-forge
libnghttp2                1.52.0               hae82a92_0    conda-forge
libsolv                   0.7.24               ha614eb4_1    conda-forge
libsqlite                 3.42.0               hb31c410_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libxml2                   2.11.4               he3bdae6_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.4.2           py310ha5d4528_0    conda-forge
ncurses                   6.4                  h7ea286d_0    conda-forge
openssl                   3.1.1                h53f4e23_1    conda-forge
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.4           py310h8e9501a_1    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.10.12         h01493a6_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
reproc                    14.2.4               h1a8c8d9_0    conda-forge
reproc-cpp                14.2.4               hb7217d7_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.17.32         py310h2aa6e3c_0    conda-forge
ruamel.yaml.clib          0.2.7           py310h8e9501a_1    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.3              pyhd8ed1ab_1    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml-cpp                  0.7.0                hb7217d7_2    conda-forge
zstandard                 0.19.0          py310h07fcf8c_2    conda-forge
zstd                      1.5.2                h4f39d0f_7    conda-forge

Environment info

active environment : base
    active env location : /Users/andres/mambaforge
            shell level : 1
       user config file : /Users/andres/.condarc
 populated config files : /Users/andres/mambaforge/.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=arm64
                          __osx=13.5.1=0
                          __unix=0=0
       base environment : /Users/andres/mambaforge  (writable)
      conda av data dir : /Users/andres/mambaforge/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 : /Users/andres/mambaforge/pkgs
                          /Users/andres/.conda/pkgs
       envs directories : /Users/andres/mambaforge/envs
                          /Users/andres/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.1.0 requests/2.31.0 CPython/3.10.12 Darwin/22.6.0 OSX/13.5.1
                UID:GID : 503:20
             netrc file : None
           offline mode : False
jakirkham commented 10 months ago

It looks the Conda version is 23.1.0 instead of 23.3.0 as specified in the constructor file

https://github.com/conda-forge/miniforge/blob/61e7d54c9f3014e0d7a16dc8d30f68378e8b92cd/Miniforge3/construct.yaml#L2

https://github.com/conda-forge/miniforge/blob/61e7d54c9f3014e0d7a16dc8d30f68378e8b92cd/Miniforge3/construct.yaml#L33

Could you please share the exact steps used to run the installer and produce the error? Please make sure to deactivate the current Conda install and place the newly installed Conda in a different location (to ensure the existing install isn't affecting it somehow)

a-munoz-rojas commented 10 months ago

Thanks. I just downloaded the installer from the GitHub main page (https://github.com/conda-forge/miniforge#mambaforge) for macosx arm64. I did this through the website directly, I did not use curl. I then ran the script:

bash Mambaforge-MacOSX-arm64.sh

Then I just install any package in an environment and I get that error:

mamba create --name testenv python=3.9
mamba activate testenv
mamba install numpy

Caveat - I just noticed I installed mambaforge last week, before the latest version was pushed yesterday, so I was using the previous version. I'll try installing the latest version again and report back.

a-munoz-rojas commented 10 months ago

PS - is there a difference in the MacOSX vs Darwin installers? I noticed that when I get the install file using the curl script as listed in the docs as opposed to just downloading the clickable link for the installer, the file that is downloaded is for Darwin because uname returns Darwin. I thought I'd ask just in case

jakirkham commented 10 months ago

AFAICT things work with the new installer, but please let us know if not. My guess is an old installer (or a leftover install) was causing issues before (missing packages, old Conda, etc.). Though would be good to know whether that holds up to testing

There shouldn't be. Darwin is the name of the kernel used by macOS (starting with macOS 10.0). So uname returns Darwin

a-munoz-rojas commented 10 months ago

Thanks for the info!

Happy to report that everything works with the new installer. I used the Miniforge installer since it seems it looks to be identical to mambaforge with the newest release.

jakirkham commented 10 months ago

Thanks Andrés! 🙏

Glad to hear things are working 😄