mpimet / easygems

Utilities for earth system model analysis
0 stars 0 forks source link

error while importing easygems.healpix #10

Open dspraturi opened 3 days ago

dspraturi commented 3 days ago

I was trying to import easygems.healpix on my computer and it is giving me an error saying ImportError: cannot import name 'trapz' from 'scipy.integrate'. My kernel is using python 3.12.4 and I could see that scipy version 1.14.0 is present in it.

d70-t commented 3 days ago

Apparently scipy 1.14.0 removed the (deprecated) trapz function in favor of the new name trapezoid. This function is used by healpy and thus by easygems. Healpy fixed this problem last week, but there is not yet a new release of healpy available.

For now, the best workaround likely is to downgrade scipy to <1.14.0 until there's a new release of healpy. We may or may not draft a new release of easygems requiring this. Once the fix in healpy is merged, we should add a dependency to the newest version of healpy.

dspraturi commented 3 days ago

Thank you! :) Switching to version 1.13.1 worked.

lkluft commented 2 days ago

Should we require scipy<1.14.0 and release a new minor release for now?

lkluft commented 2 days ago

Should we require scipy<1.14.0 and release a new minor release for now?

Or we are fast with #11 and circumvent the issue ;)

d70-t commented 2 days ago

Should we require scipy<1.14.0 and release a new minor release for now?

Yes, I'd vote for this. Probably healpy will still take a few moments to make a new release and #11 at the moment seems to to be a little more involved than initially expected.

d70-t commented 2 days ago

Ok, there's now easygems 0.0.8 which includes the temporary scipy restriction.