Search code examples
pythoncondaanaconda3

Conda search can't find package that can be found on conda cloud


For example, I can find gxx_linux-64 on anaconda cloud, but when I search for it using conda search:

conda search -c conda-forge gxx_linux-64

It tells me

Loading channels: done
No match found for: gxx_linux-64. Search: *gxx_linux-64*

PackagesNotFoundError: The following packages are not available from current channels:

  - gxx_linux-64

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Solution

  • Conda restricts searching to the noarch and the platform-specific subdirectories of channels. In this case, the channel information indicates that the search is run on osx-64 platform, whereas the package is clearly a linux-64 build, hence why it isn't found.

    One can specifically search other subdirectories by including this is the channel specification. That is, no matter the platform from which ones searches, the package should be found with

    conda search -c conda-forge/linux-64 gxx_linux-64
    

    or, using the full MatchSpec syntax

    conda search conda-forge::gxx_linux-64[subdir=“linux-64”]
    

    However, note that this package won't be compatible with osx-64.