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

Xclim package not loading #212

Closed
kushankb opened this issue May 4, 2023 · 8 comments
Closed

Xclim package not loading #212

kushankb opened this issue May 4, 2023 · 8 comments

Comments

@kushankb
Copy link

kushankb commented May 4, 2023

Hi there,
I am a recent planetary computer convert. Till last week, I was able to load the xclim package on the hub with no issue. Today, when I am trying to load the xclim package, I get the following error: ModuleNotFoundError: No module named 'pint.unit'. It looks like there is an issue with the pint package dependency. Is there any fix?

Thanks!

@TomAugspurger
Copy link

Thanks, I'm working on that currently.

tl/dr, we're running into Ouranosinc/xclim#1216. I'm going to fix it temporarily by pinning our version of pint to 0.19.2, and will look into moving to a newer version of xclim later (for some reason the environment isn't solving with the latest version).

I'll have a PR to https://github.com/microsoft/planetary-computer-containers shortly, and it'll be deployed later today.

You can work around it temporarily by pip install pint==0.19.2 and restarting your Python kernel.

@kushankb
Copy link
Author

kushankb commented May 4, 2023 via email

TomAugspurger pushed a commit to microsoft/planetary-computer-containers that referenced this issue May 4, 2023
Pins pint to 0.19.2 to avoid an import error.

microsoft/PlanetaryComputer#212
TomAugspurger pushed a commit to microsoft/planetary-computer-containers that referenced this issue May 4, 2023
Pins pint to 0.19.2 to avoid an import error.

microsoft/PlanetaryComputer#212
@kushankb
Copy link
Author

kushankb commented May 4, 2023 via email

@TomAugspurger
Copy link

Hmm that's unfortunate. Looks like an incompatibility with pandas 2.x and the older version of xclim. I'll have to try getting everything updated.

@TomAugspurger
Copy link

Right now it looks like we're stuck with what we have. The hard pin on pandas<2 by xclim 0.42 is incompatible with other things in our environment.

I believe I did get a basic example working with xclim 0.42, so if you're still seeing errors you might want to make a reproducible bug report and submit it to the issue tracker.

We'll upgrade the containers once xclim makes their next release.

@kushankb
Copy link
Author

kushankb commented May 5, 2023 via email

@TomAugspurger
Copy link

I tried to update this last week, but ran into an issue with conda-lock. I'll try again this week.

@TomAugspurger
Copy link

This is all fixed now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants