Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use defaults::* match specs in the CLI #2431

Closed
2 tasks done
jaimergp opened this issue Mar 31, 2023 · 11 comments · Fixed by #2927
Closed
2 tasks done

Cannot use defaults::* match specs in the CLI #2431

jaimergp opened this issue Mar 31, 2023 · 11 comments · Fixed by #2927
Assignees
Labels
type::bug Something isn't working

Comments

@jaimergp
Copy link
Contributor

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Search tried in issue tracker

N/A

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not reproducible with Conda

Describe your issue

Users can't use defaults:: as a channel specifier.

$ micromamba create -n unused --dry-run python defaults::libarchive --channel-priority flexible


                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/main/osx-arm64                                           No change
pkgs/main/noarch                                              No change
pkgs/r/noarch                                                 No change
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
warning  libmamba Problem type not implemented SOLVER_RULE_JOB_UNSUPPORTED
error    libmamba Could not solve for environment specs
    .

Using main does work, though:

micromamba create -n unused --dry-run python main::libarchive --channel-priority flexible

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

warning  libmamba 'root_prefix' set with default value: /Users/jrodriguez/micromamba
conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
main/osx-arm64                                                No change
main/noarch                                                   No change

Transaction

  Prefix: /Users/jrodriguez/micromamba/envs/unused

  Updating specs:

   - python
   - main::libarchive


  Package              Version  Build               Channel                     Size
──────────────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────────────

  + bzip2                1.0.8  h3422bc3_4          conda-forge/osx-arm64     Cached
  + ca-certificates  2022.12.7  h4653dfc_0          conda-forge/osx-arm64     Cached
  + icu                   72.1  he12128b_0          conda-forge/osx-arm64       12MB
  + libarchive           3.6.2  h09f0540_1          main/osx-arm64               2MB
  + libcxx              16.0.0  h75e25f2_0          conda-forge/osx-arm64        1MB
  + libexpat             2.5.0  hb7217d7_1          conda-forge/osx-arm64       63kB
  + libffi               3.4.2  h3422bc3_5          conda-forge/osx-arm64     Cached
  + libiconv              1.17  he4db4b2_0          conda-forge/osx-arm64        1MB
  + libsqlite           3.40.0  h76d750c_0          conda-forge/osx-arm64     Cached
  + libxml2             2.10.3  h2aff0a6_6          conda-forge/osx-arm64      599kB
  + libzlib             1.2.13  h03a7124_4          conda-forge/osx-arm64     Cached
  + lz4-c                1.9.4  hb7217d7_0          conda-forge/osx-arm64      141kB
  + ncurses                6.3  h07bb92c_1          conda-forge/osx-arm64     Cached
  + openssl              3.1.0  h03a7124_0          conda-forge/osx-arm64        2MB
  + python              3.11.1  h1456518_0_cpython  conda-forge/osx-arm64       14MB
  + readline               8.2  h92ec313_1          conda-forge/osx-arm64      250kB
  + tk                  8.6.12  he1e0b03_0          conda-forge/osx-arm64     Cached
  + tzdata               2023c  h71feb2d_0          conda-forge/noarch         118kB
  + xz                  5.2.10  h80987f9_1          main/osx-arm64             286kB
  + zlib                1.2.13  h03a7124_4          conda-forge/osx-arm64       81kB
  + zstd                 1.5.2  hf913c23_6          conda-forge/osx-arm64      308kB

  Summary:

  Install: 21 packages

  Total download: 34MB

──────────────────────────────────────────────────────────────────────────────────────


Dry run. Not executing the transaction.

And so does pkgs/main:::

micromamba create -n unused --dry-run python pkgs/main::libarchive --channel-priority flexible

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

warning  libmamba 'root_prefix' set with default value: /Users/jrodriguez/micromamba
conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/main/osx-arm64                                           No change
pkgs/main/noarch                                              No change

Transaction

  Prefix: /Users/jrodriguez/micromamba/envs/unused

  Updating specs:

   - python
   - pkgs/main::libarchive


  Package              Version  Build               Channel                     Size
──────────────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────────────

  + bzip2                1.0.8  h3422bc3_4          conda-forge/osx-arm64     Cached
  + ca-certificates  2022.12.7  h4653dfc_0          conda-forge/osx-arm64     Cached
  + icu                   72.1  he12128b_0          conda-forge/osx-arm64       12MB
  + libarchive           3.6.2  h09f0540_1          pkgs/main/osx-arm64        835kB
  + libcxx              16.0.0  h75e25f2_0          conda-forge/osx-arm64        1MB
  + libexpat             2.5.0  hb7217d7_1          conda-forge/osx-arm64       63kB
  + libffi               3.4.2  h3422bc3_5          conda-forge/osx-arm64     Cached
  + libiconv              1.17  he4db4b2_0          conda-forge/osx-arm64        1MB
  + libsqlite           3.40.0  h76d750c_0          conda-forge/osx-arm64     Cached
  + libxml2             2.10.3  h2aff0a6_6          conda-forge/osx-arm64      599kB
  + libzlib             1.2.13  h03a7124_4          conda-forge/osx-arm64     Cached
  + lz4-c                1.9.4  hb7217d7_0          conda-forge/osx-arm64      141kB
  + ncurses                6.3  h07bb92c_1          conda-forge/osx-arm64     Cached
  + openssl              3.1.0  h03a7124_0          conda-forge/osx-arm64        2MB
  + python              3.11.1  h1456518_0_cpython  conda-forge/osx-arm64       14MB
  + readline               8.2  h92ec313_1          conda-forge/osx-arm64      250kB
  + tk                  8.6.12  he1e0b03_0          conda-forge/osx-arm64     Cached
  + tzdata               2023c  h71feb2d_0          conda-forge/noarch         118kB
  + xz                  5.2.10  h80987f9_1          pkgs/main/osx-arm64        269kB
  + zlib                1.2.13  h03a7124_4          conda-forge/osx-arm64       81kB
  + zstd                 1.5.2  hf913c23_6          conda-forge/osx-arm64      308kB

  Summary:

  Install: 21 packages

  Total download: 34MB

──────────────────────────────────────────────────────────────────────────────────────


Dry run. Not executing the transaction.

mamba has the same issues.

mamba info / micromamba info

__
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/


            environment : /Users/jrodriguez/.local/anaconda (active)
           env location : /Users/jrodriguez/.local/anaconda
      user config files : /Users/jrodriguez/.mambarc
 populated config files : /Users/jrodriguez/.local/anaconda/.condarc
                          /Users/jrodriguez/.condarc
       libmamba version : 1.4.1
     micromamba version : 1.4.1
           curl version : libcurl/7.88.1 SecureTransport (OpenSSL/3.1.0) zlib/1.2.13 zstd/1.5.2 libssh2/1.10.0 nghttp2/1.52.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       virtual packages : __unix=0=0
                          __osx=13.2.1=0
                          __archspec=1=arm64
               channels : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /Users/jrodriguez/micromamba
               platform : osx-arm64

Logs

micromamba create -n unused --dry-run python defaults::libarchive --channel-priority flexible -v

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

warning  libmamba 'root_prefix' set with default value: /Users/jrodriguez/micromamba
info     libmamba You have not set the 'root_prefix' environment variable.
    To permanently modify the root prefix location, either:
    - set the 'MAMBA_ROOT_PREFIX' environment variable
    - use the '-r,--root-prefix' CLI option
    - use 'micromamba shell init ...' to initialize your shell
        (then restart or source the contents of the shell init script)
info     libmamba Parsing MatchSpec python
info     libmamba Parsing MatchSpec defaults::libarchive
info     libmamba Found token for https://conda.anaconda.org at "/Users/jrodriguez/.continuum/anaconda-client/tokens/https%3A%2F%2Fapi.anaconda.org.token"
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/osx-arm64/repodata.json'
conda-forge/osx-arm64                                       Using cache
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/noarch/repodata.json'
conda-forge/noarch                                          Using cache
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json'
info     libmamba No valid cache found
info     libmamba Expired cache (or invalid mod/etag headers) found at '/Users/jrodriguez/micromamba/pkgs'
info     libmamba Using macOS SecureTransport backend
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/main/noarch/repodata.json'
info     libmamba No valid cache found
info     libmamba Expired cache (or invalid mod/etag headers) found at '/Users/jrodriguez/micromamba/pkgs'
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/r/osx-arm64/repodata.json'
info     libmamba No valid cache found
info     libmamba Expired cache (or invalid mod/etag headers) found at '/Users/jrodriguez/micromamba/pkgs'
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/r/noarch/repodata.json'
info     libmamba No valid cache found
info     libmamba Expired cache (or invalid mod/etag headers) found at '/Users/jrodriguez/micromamba/pkgs'
info     libmamba All targets to download are cached
info     libmamba Starting to download targets
[+] 0.2s
pkgs/main/osx-arm64 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━╸━━━━   0.0 B /  ??.?MB @  ??.?MB/s  0.2s
pkgs/main/noarch    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0.0 B /  ??.?MB @  ??.?MB/s  0.2s
pkgs/r/osx-arm64    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━╸━━━━━━   0.0 B /  ??.?MB @  ??.?MB/s  0.2s
pkgs/r/noarch       ━━━━━━━━━╸━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0.0 B /  ??.?MB @  ??.?MB/s  0.2sinfo     libmamba Transfer done for 'pkgs/main/osx-arm64'
info     libmamba Transfer finalized, status: 304 [https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json] 0 bytes
info     libmamba Cache is still valid
info     libmamba Transfer done for 'pkgs/main/noarch'
info     libmamba Transfer finalized, status: 304 [https://repo.anaconda.com/pkgs/main/noarch/repodata.json] 0 bytes
info     libmamba Cache is still valid
info     libmamba Transfer done for 'pkgs/r/osx-arm64'
info     libmamba Transfer finalized, status: 304 [https://repo.anaconda.com/pkgs/r/osx-arm64/repodata.json] 0 bytes
pkgs/main/osx-arm64                                           No change
pkgs/main/noarch                                              No change
pkgs/r/osx-arm64                                              No change
pkgs/r/noarch                                                 No change
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/a850f475.solv.*' for repo index 'https://conda.anaconda.org/conda-forge/osx-arm64'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/a850f475.solv"
info     libmamba Metadata solv file: https://conda.anaconda.org/conda-forge/osx-arm64/repodata.json 0 W/"a252c3957da2f82752bc3cbaf93bef42" Fri, 31 Mar 2023 09:10:43 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/09cdf8bf.solv.*' for repo index 'https://conda.anaconda.org/conda-forge/noarch'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/09cdf8bf.solv"
info     libmamba Metadata solv file: https://conda.anaconda.org/conda-forge/noarch/repodata.json 0 W/"d1d3ab9adada51523dec3fb592072783" Fri, 31 Mar 2023 09:10:35 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/9e99ffaf.solv.*' for repo index 'https://repo.anaconda.com/pkgs/main/osx-arm64'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/9e99ffaf.solv"
info     libmamba Metadata solv file: https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json 0 W/"2598653c6ed3a18cbc98bbde33f10a31" Thu, 30 Mar 2023 20:30:19 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/3e39a7aa.solv.*' for repo index 'https://repo.anaconda.com/pkgs/main/noarch'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/3e39a7aa.solv"
info     libmamba Metadata solv file: https://repo.anaconda.com/pkgs/main/noarch/repodata.json 0 W/"deb464b98d321eba80429405048bf2d1" Tue, 28 Mar 2023 07:43:22 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/8bd55712.solv.*' for repo index 'https://repo.anaconda.com/pkgs/r/osx-arm64'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/8bd55712.solv"
info     libmamba Metadata solv file: https://repo.anaconda.com/pkgs/r/osx-arm64/repodata.json 0 W/"bd18071599942dd824e1ec40e9d10873" Fri, 19 Aug 2022 21:27:22 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Reading cache files '/Users/jrodriguez/micromamba/pkgs/cache/4ea078d6.solv.*' for repo index 'https://repo.anaconda.com/pkgs/r/noarch'
info     libmamba Attempt load from solv "/Users/jrodriguez/micromamba/pkgs/cache/4ea078d6.solv"
info     libmamba Metadata solv file: https://repo.anaconda.com/pkgs/r/noarch/repodata.json 0 W/"93476d5e7aa8d3f8bc0c04afafc94d26" Fri, 28 Oct 2022 15:33:23 GMT 1.1_0.7.23
info     libmamba Metadata from SOLV are valid
info     libmamba Adding package record to repo __archspec
info     libmamba Adding package record to repo __osx
info     libmamba Adding package record to repo __unix
info     libmamba Parsing MatchSpec python
info     libmamba Parsing MatchSpec python
info     libmamba Adding job: python
info     libmamba Parsing MatchSpec defaults::libarchive
info     libmamba Parsing MatchSpec defaults::libarchive
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
info     libmamba Problem count: 1
warning  libmamba Problem type not implemented SOLVER_RULE_JOB_UNSUPPORTED
error    libmamba Could not solve for environment specs
    .
info     libmamba Freeing solver.
info     libmamba Freeing pool.
critical libmamba Could not solve for environment specs

environment.yml

No response

~/.condarc

==> /Users/jrodriguez/.local/anaconda/.condarc <==
channels:
  - conda-forge

==> /Users/jrodriguez/.condarc <==
add_pip_as_python_dependency: False
auto_update_conda: False
channel_priority: strict
channels:
  - conda-forge
show_channel_urls: True
solver: libmamba
@jonashaag
Copy link
Collaborator

What's Conda's behaviour here?

@jonashaag
Copy link
Collaborator

related #2260

@jaimergp
Copy link
Contributor Author

It gets libarchive from defaults:

$ conda create -n unused --dry-run python defaults::libarchive --no-channel-priority --solver classic
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 23.1.0
  latest version: 23.3.1

Please update conda by running

    $ conda update -n base -c conda-forge conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.3.1



## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/unused

  added / updated specs:
    - defaults::libarchive
    - python


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2023.01.10 |       hca03da5_0         121 KB  defaults
    libarchive-3.6.2           |       h09f0540_1         815 KB  defaults
    libcxx-16.0.0              |       h75e25f2_0         1.1 MB  conda-forge
    ncurses-6.4                |       h313beb8_0         884 KB  defaults
    python-3.11.2              |       hc0d8a6c_0        15.3 MB  defaults
    sqlite-3.41.1              |       h80987f9_0         1.1 MB  defaults
    xz-5.2.10                  |       h80987f9_1         263 KB  defaults
    zstd-1.5.4                 |       hd90d995_0         500 KB  defaults
    ------------------------------------------------------------
                                           Total:        20.0 MB

The following NEW packages will be INSTALLED:

  bzip2              conda-forge/osx-arm64::bzip2-1.0.8-h3422bc3_4 
  ca-certificates    pkgs/main/osx-arm64::ca-certificates-2023.01.10-hca03da5_0 
  icu                conda-forge/osx-arm64::icu-72.1-he12128b_0 
  libarchive         pkgs/main/osx-arm64::libarchive-3.6.2-h09f0540_1 
  libcxx             conda-forge/osx-arm64::libcxx-16.0.0-h75e25f2_0 
  libffi             conda-forge/osx-arm64::libffi-3.4.2-h3422bc3_5 
  libiconv           conda-forge/osx-arm64::libiconv-1.17-he4db4b2_0 
  libxml2            conda-forge/osx-arm64::libxml2-2.10.3-h2aff0a6_6 
  libzlib            conda-forge/osx-arm64::libzlib-1.2.13-h03a7124_4 
  lz4-c              conda-forge/osx-arm64::lz4-c-1.9.4-hb7217d7_0 
  ncurses            pkgs/main/osx-arm64::ncurses-6.4-h313beb8_0 
  openssl            conda-forge/osx-arm64::openssl-1.1.1t-h03a7124_0 
  python             pkgs/main/osx-arm64::python-3.11.2-hc0d8a6c_0 
  readline           conda-forge/osx-arm64::readline-8.2-h92ec313_1 
  sqlite             pkgs/main/osx-arm64::sqlite-3.41.1-h80987f9_0 
  tk                 conda-forge/osx-arm64::tk-8.6.12-he1e0b03_0 
  tzdata             conda-forge/noarch::tzdata-2023c-h71feb2d_0 
  xz                 pkgs/main/osx-arm64::xz-5.2.10-h80987f9_1 
  zlib               conda-forge/osx-arm64::zlib-1.2.13-h03a7124_4 
  zstd               pkgs/main/osx-arm64::zstd-1.5.4-hd90d995_0 



DryRunExit: Dry run. Exiting.

@jaimergp
Copy link
Contributor Author

We implemented a workaround for conda-libmamba-solver (see conda/conda-libmamba-solver#172) by "translating" defaults to pkgs/main, pkgs/r or pkgs/msys2 with a simple (and ugly) heuristic, but it would still fail for the general case of any MultiChannel, I guess.

@jaimergp
Copy link
Contributor Author

This got worse with mamba 1.5.0:

$ mamba create -n unused --dry-run defaults::python

Looking for: ['defaults::python']

pkgs/r/linux-aarch64                               122.0 B @ 529.0 B/s  0.2s
pkgs/main/linux-aarch64                              1.9MB @   4.1MB/s  0.5s
pkgs/main/noarch                                   696.6kB @   1.4MB/s  0.5s
pkgs/r/noarch                                        1.3MB @   2.0MB/s  0.4s
conda-forge/linux-aarch64                            8.6MB @   7.2MB/s  1.3s
conda-forge/noarch                                  12.2MB @   8.9MB/s  1.5s
Could not solve for environment specs
The following package could not be installed
└─ python does not exist (perhaps a typo or a missing channel).
$ mamba create -n unused --dry-run pkgs/main::python

Looking for: ['pkgs/main::python']

conda-forge/linux-aarch64                                   Using cache
conda-forge/noarch                                          Using cache
pkgs/main/linux-aarch64                                     Using cache
pkgs/main/noarch                                            Using cache
The package "pkgs/main::python" is not available for the specified platform

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/conda-src/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 945, in exception_converter
        raise e
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 938, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 884, in _wrapped_main
        result = do_call(parsed_args, p)
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 760, in do_call
        exit_code = create(args, parser)
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 601, in create
        return install(args, parser, "create")
      File "/opt/conda/lib/python3.10/site-packages/mamba/mamba.py", line 483, in install
        solver.add_jobs(mamba_solve_specs, solver_task)
    RuntimeError: The package "pkgs/main::python" is not available for the specified platform

`$ /opt/conda/bin/mamba create -n unused --dry-run pkgs/main::python`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/opt/conda/bin/conda
             CONDA_PREFIX=/opt/conda
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/opt/conda/bin/python
               CONDA_ROOT=/opt/conda
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
               LD_PRELOAD=<not set>
                     PATH=/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/usr/local/sbin:/usr
                          /local/bin:/usr/sbin:/usr/bin:/sbin:/bin
           PYTHONHASHSEED=2161069660
     PYTHON_MAJOR_VERSION=3
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /home/test_user/.condarc
 populated config files : /opt/conda/.condarc
          conda version : 23.7.3
    conda-build version : 3.26.1
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=aarch64
                          __glibc=2.31=0
                          __linux=5.15.49=0
                          __unix=0=0
       base environment : /opt/conda  (read only)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-aarch64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /opt/conda/pkgs
                          /home/test_user/.conda/pkgs
       envs directories : /home/test_user/.conda/envs
                          /opt/conda/envs
               platform : linux-aarch64
             user-agent : conda/23.7.3 requests/2.28.2 CPython/3.10.10 Linux/5.15.49-linuxkit-pr debian/11 glibc/2.31
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

This does work though:

$ mamba create -n unused --dry-run conda-forge::python --override-channels -c defaults

Looking for: ['conda-forge::python']

conda-forge/linux-aarch64                                   Using cache
conda-forge/noarch                                          Using cache
pkgs/main/noarch                                              No change
pkgs/r/linux-aarch64                                          No change
pkgs/r/noarch                                                 No change
pkgs/main/linux-aarch64                                       No change
Transaction

  Prefix: /home/test_user/.conda/envs/unused

  Updating specs:

   - conda-forge::python


  Package                     Version  Build               Channel           Size
───────────────────────────────────────────────────────────────────────────────────
  Install:
───────────────────────────────────────────────────────────────────────────────────

  + ld_impl_linux-aarch64        2.38  h8131f2d_1          pkgs/main        797kB
  + ca-certificates        2023.05.30  hd43f75c_0          pkgs/main        123kB
  + _libgcc_mutex                 0.1  main                pkgs/main          2kB
  + libstdcxx-ng               11.2.0  h1234567_1          pkgs/main        798kB
  + tzdata                      2023c  h04d1e81_0          pkgs/main        118kB
  + libgomp                    13.1.0  h2b4548d_0          conda-forge      423kB
  + _openmp_mutex                 5.1  51_gnu              pkgs/main          1MB
  + libgcc-ng                  13.1.0  h2b4548d_0          conda-forge      457kB
  + openssl                     3.1.2  h31becfc_0          conda-forge     Cached
  + libzlib                    1.2.13  h31becfc_5          conda-forge       67kB
  + libuuid                    2.38.1  hb4cce97_0          conda-forge     Cached
  + libexpat                    2.5.0  hd600fc2_1          conda-forge     Cached
  + libsqlite                  3.43.0  h194ca79_0          conda-forge        1MB
  + zlib                       1.2.13  h31becfc_5          conda-forge       96kB
  + xz                          5.4.2  h998d150_0          pkgs/main        676kB
  + ncurses                       6.4  h419075a_0          pkgs/main          1MB
  + libnsl                      2.0.0  h998d150_0          pkgs/main         32kB
  + libffi                      3.4.4  h419075a_0          pkgs/main        143kB
  + bzip2                       1.0.8  hfd63f10_2          pkgs/main         87kB
  + tk                         8.6.12  h241ca14_0          pkgs/main          3MB
  + readline                      8.2  h998d150_0          pkgs/main        390kB
  + python                     3.11.4  h43d1f9e_0_cpython  conda-forge       15MB
  + wheel                      0.38.4  py311hd43f75c_0     pkgs/main         82kB
  + setuptools                 68.0.0  py311hd43f75c_0     pkgs/main          1MB
  + pip                        23.2.1  py311hd43f75c_0     pkgs/main          3MB

  Summary:

  Install: 25 packages

  Total download: 31MB

───────────────────────────────────────────────────────────────────────────────────


Dry run. Exiting.

DryRunExit: Dry run. Exiting.

@jonashaag
Copy link
Collaborator

jonashaag commented Aug 25, 2023

I wonder if we introduced this in #2300

cc @ThomasBlauthQC

Update: I don't think we did

@jaimergp
Copy link
Contributor Author

Good catch @jonashaag, things do work if request pkgs/main/linux-aarch64::python. Sadly we cannot know if the package requested will come from context.subdir or noarch :/

@jaimergp
Copy link
Contributor Author

From @jonashaag's comment at #2300 (comment):

Are there any known channels with / other than the official Anaconda ones? I wonder if we could get away with hardcoding them if the subdir lookup thing is too complicated to implement.

Any label channel will have a couple slashes; e.g. conda-canary/label/dev.

@isuruf
Copy link
Contributor

isuruf commented Oct 19, 2023

@AntoinePrv, I have some time to have a look. Let me know if you are looking into this and if not I can have a look.

@AntoinePrv
Copy link
Member

@isuruf help would be much appreciated thanks, I'm a bit under the water, let me know if you need help understanding things.

@isuruf
Copy link
Contributor

isuruf commented Oct 20, 2023

The regression is fixed in #2926. Not the original issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants