xcube-dev / xcube

xcube is a Python package for generating and exploiting data cubes powered by xarray, dask, and zarr.
https://xcube.readthedocs.io/
MIT License
203 stars 19 forks source link

xcube requirements don't fit with aiobotocore requirements leading to a import error #1076

Closed Sonicious closed 1 month ago

Sonicious commented 2 months ago

Initial installation (outside DeepESDL, Ubuntu 24.04.1 LTS, Conda 24.7.1 ) with:

conda create -n xcubetest python pip xcube 
conda activate xcubetest

importing of xcube.core.store fails with ImportError: cannot import name 'resolve_auth_type' from 'botocore.auth'

Since this sounded and turned out as an error in aiobotocore/botocore, pip check should show dependencies here:

xcube 1.7.0 has requirement botocore>=1.34.51, but you have botocore 1.34.31.
aiobotocore 2.15.1 has requirement botocore<1.35.24,>=1.35.16, but you have botocore 1.34.31.
pont-us commented 2 months ago

I'm unable to reproduce this locally (Ubuntu 20.04 / Conda 24.7.1): conda create -n xcubetest python pip xcube installs botocore 1.35.23, which clearly satisfies the version requirements of both xcube and aiobotocore.

Currently I can't explain why you're getting an incorrect botocore version when a suitable version is available and I don't know why your conda is going ahead and setting up the environment you're getting: even if there were no suitable version of botocore available, normal conda behaviour would be to report the inconsistent requirements and abort, rather than creating a broken environment.

conda install -c conda-forge botocore=1.35.23 in the activated environment should fix it, but I'm concerned that the broken environment may be a symptom of some deeper problem.

pont-us commented 1 month ago

Since we're still unable to reproduce the error I'm closing this issue for now. If the solution suggested above didn't help (conda install -c conda-forge botocore=1.35.23) and you still need assistance, you can post an update and we'll reopen the issue and continue debugging.