ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
409 stars 77 forks source link

Cannot install version 0.9.9.0 or above in aarch64 #302

Closed crd1985 closed 7 months ago

crd1985 commented 2 years ago

Description

When trying to install cfgrib in a c6g instance with ARM CPUs (aarch64) in AWS on miniconda3 I can only install version 0.9.8.5 as shown below:

$ conda install -c conda-forge cfgrib
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/ec2-user/miniconda3/envs/grib

  added / updated specs:
    - cfgrib

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bottleneck-1.3.4           |   py39h452c293_0         123 KB  conda-forge
    certifi-2021.10.8          |   py39ha65689a_1         145 KB  conda-forge
    cffi-1.14.6                |   py39h460e462_0         248 KB  conda-forge
    click-8.1.0                |   py39ha65689a_0         146 KB  conda-forge
    importlib-metadata-4.11.4  |   py39ha65689a_0          33 KB  conda-forge
    numexpr-2.7.3              |   py39h7b4a2eb_0         239 KB  conda-forge
    numpy-1.21.3               |   py39h43e3299_0         6.1 MB  conda-forge
    pandas-1.4.2               |   py39h22f4aa5_0         9.7 MB
    python_abi-3.9             |           2_cp39           4 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        16.7 MB

The following NEW packages will be INSTALLED:

  attrs              conda-forge/noarch::attrs-21.4.0-pyhd8ed1ab_0
  bottleneck         conda-forge/linux-aarch64::bottleneck-1.3.4-py39h452c293_0
  bzip2              conda-forge/linux-aarch64::bzip2-1.0.8-hf897c2e_4
  c-ares             conda-forge/linux-aarch64::c-ares-1.18.1-hf897c2e_0
  cffi               conda-forge/linux-aarch64::cffi-1.14.6-py39h460e462_0
  cfgrib             conda-forge/noarch::cfgrib-0.9.8.5-pyhd8ed1ab_0
  click              conda-forge/linux-aarch64::click-8.1.0-py39ha65689a_0
  curl               conda-forge/linux-aarch64::curl-7.79.1-hcafe9da_1
  eccodes            conda-forge/linux-aarch64::eccodes-2.26.0-h2c0b7d4_0
  freeglut           conda-forge/linux-aarch64::freeglut-3.2.2-h01db608_1
  hdf4               conda-forge/linux-aarch64::hdf4-4.2.15-hc8204c4_3
  hdf5               conda-forge/linux-aarch64::hdf5-1.12.1-nompi_h774d4d8_100
  importlib-metadata conda-forge/linux-aarch64::importlib-metadata-4.11.4-py39ha65689a_0
  importlib_metadata conda-forge/noarch::importlib_metadata-4.11.4-hd8ed1ab_0
  jasper             conda-forge/linux-aarch64::jasper-2.0.33-h5ced176_0
  jpeg               conda-forge/linux-aarch64::jpeg-9e-h9cdd2b7_1
  keyutils           conda-forge/linux-aarch64::keyutils-1.6.1-h4e544f5_0
  krb5               conda-forge/linux-aarch64::krb5-1.19.3-h7c456eb_0
  libaec             conda-forge/linux-aarch64::libaec-1.0.6-h01db608_0
  libblas            conda-forge/linux-aarch64::libblas-3.9.0-14_linuxaarch64_openblas
  libcblas           conda-forge/linux-aarch64::libcblas-3.9.0-14_linuxaarch64_openblas
  libcurl            conda-forge/linux-aarch64::libcurl-7.79.1-hcafe9da_1
  libedit            conda-forge/linux-aarch64::libedit-3.1.20191231-he28a2e2_2
  libev              conda-forge/linux-aarch64::libev-4.33-h516909a_1
  libgfortran-ng     conda-forge/linux-aarch64::libgfortran-ng-12.1.0-he9431aa_16
  libgfortran5       conda-forge/linux-aarch64::libgfortran5-12.1.0-h41d5c85_16
  libglu             conda-forge/linux-aarch64::libglu-9.0.0-he1b5a44_1001
  liblapack          conda-forge/linux-aarch64::liblapack-3.9.0-14_linuxaarch64_openblas
  libnetcdf          conda-forge/linux-aarch64::libnetcdf-4.8.1-nompi_haf8ccf0_101
  libnghttp2         conda-forge/linux-aarch64::libnghttp2-1.43.0-h097699d_1
  libopenblas        conda-forge/linux-aarch64::libopenblas-0.3.20-pthreads_h6cb6f83_0
  libpng             conda-forge/linux-aarch64::libpng-1.6.37-hbd635b3_2
  libssh2            conda-forge/linux-aarch64::libssh2-1.10.0-h1ab2c7b_2
  libxcb             conda-forge/linux-aarch64::libxcb-1.13-h3557bc0_1004
  libzip             conda-forge/linux-aarch64::libzip-1.8.0-h64a541f_1
  numexpr            conda-forge/linux-aarch64::numexpr-2.7.3-py39h7b4a2eb_0
  numpy              conda-forge/linux-aarch64::numpy-1.21.3-py39h43e3299_0
  packaging          conda-forge/noarch::packaging-21.3-pyhd8ed1ab_0
  pandas             pkgs/main/linux-aarch64::pandas-1.4.2-py39h22f4aa5_0
  pthread-stubs      conda-forge/linux-aarch64::pthread-stubs-0.4-hb9de7d4_1001
  pycparser          conda-forge/noarch::pycparser-2.21-pyhd8ed1ab_0
  pyparsing          conda-forge/noarch::pyparsing-3.0.9-pyhd8ed1ab_0
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  python_abi         conda-forge/linux-aarch64::python_abi-3.9-2_cp39
  pytz               conda-forge/noarch::pytz-2022.1-pyhd8ed1ab_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  typing_extensions  conda-forge/noarch::typing_extensions-4.2.0-pyha770c72_1
  xarray             conda-forge/noarch::xarray-2022.3.0-pyhd8ed1ab_0
  xorg-fixesproto    conda-forge/linux-aarch64::xorg-fixesproto-5.0-h3557bc0_1002
  xorg-inputproto    conda-forge/linux-aarch64::xorg-inputproto-2.3.2-h3557bc0_1002
  xorg-kbproto       conda-forge/linux-aarch64::xorg-kbproto-1.0.7-h3557bc0_1002
  xorg-libx11        conda-forge/linux-aarch64::xorg-libx11-1.7.2-h3557bc0_0
  xorg-libxau        conda-forge/linux-aarch64::xorg-libxau-1.0.9-h3557bc0_0
  xorg-libxdmcp      conda-forge/linux-aarch64::xorg-libxdmcp-1.1.3-h3557bc0_0
  xorg-libxext       conda-forge/linux-aarch64::xorg-libxext-1.3.4-h3557bc0_1
  xorg-libxfixes     conda-forge/linux-aarch64::xorg-libxfixes-5.0.3-h3557bc0_1004
  xorg-libxi         conda-forge/linux-aarch64::xorg-libxi-1.7.10-h3557bc0_0
  xorg-xextproto     conda-forge/linux-aarch64::xorg-xextproto-7.3.0-h3557bc0_1002
  xorg-xproto        conda-forge/linux-aarch64::xorg-xproto-7.0.31-h3557bc0_1007
  zipp               conda-forge/noarch::zipp-3.8.0-pyhd8ed1ab_0

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2022.4.26-~ --> conda-forge::ca-certificates-2022.5.18.1-h4fd8a4c_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main::certifi-2022.5.18.1-py39hd~ --> conda-forge::certifi-2021.10.8-py39ha65689a_1
  openssl              pkgs/main::openssl-1.1.1o-h2f4d8fa_0 --> conda-forge::openssl-1.1.1o-h4e544f5_0

Proceed ([y]/n)? 

Furthermore, if I try to force a newer version then conda complains:

$ conda install -c conda-forge cfgrib=0.9.9.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                      

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - cfgrib=0.9.9.0 -> python[version='3.6.12|3.6.12|3.7.10|3.7.10|3.7.12|3.8.12|3.9.10|>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*|>=3.8,<3.9.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.9,<3.10.0a0|>=3.10,<3.11.0a0|>=3.10,<3.11.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3|>=3.6|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0|>=3.8|3.7.9|3.6.9|3.6.9|3.6.9|3.6.9|>=3.5.3|>=3.5',build='1_73_pypy|2_73_pypy|4_73_pypy|5_73_pypy|*_cpython|*_73_pypy|*_cpython|*_73_pypy|*_73_pypy|0_73_pypy|0_73_pypy|0_73_pypy|1_73_pypy|0_73_pypy|5_73_pypy|3_73_pypy|0_73_pypy']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

I tried with python versions 3.7, 3.8 and 3.9 with the same result. Maybe the conda-forge repo for this architecture is not up to date or simply this architecture is not supported?

alexander0042 commented 1 year ago

Not sure if you ever found a solution to this, but my workaround is to install using pip, forcing the correct version. It's ugly, but appears to solve the issue until conda gets updated

philippemiron commented 11 months ago

I think that issue is because that python-eccodes is not available for linux-aarch64. When adding to my environment cfgrib<=0.9.10.4, I get:

cfgrib  0.9.8.5
eccodes 2.32.1

It uses eccodes but it doesn't depend on python-eccodes. I guess it started using the python wrapper in a later version. I created a feature request here to add linux-aarch64 to the platform.

iainrussell commented 7 months ago

I believe this should be solved now that we have an aarch64 version of python-eccodes.