Stream: python-questions

Topic: Error loading xeofs


view this post on Zulip Mari Tye (Feb 18 2025 at 17:51):

I'm struggling to load the xeofs module. It doesn't appear to be compatible with the most recent NCAR package library*, using a modified version of NPL2024b I get the following error message

AttributeError: module 'xarray' has no attribute 'DataTree'

But I have xarray-datatree 0.0.14 in my environment.

:asterisk: the most recent environment gives this set of messages when I try to install xeofs
The following packages are incompatible
├─ pin-1 is installable and it requires
│ └─ python 3.12.* , which can be installed;
└─ xeofs is not installable because there are no viable options
├─ xeofs [0.5.0|0.6.0|...|1.2.0] would require
│ └─ pandas >=1.4.1,<2.0.0 but there are no viable options
│ ├─ pandas [1.4.1|1.4.2|...|1.5.3] would require
│ │ └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
│ ├─ pandas [1.4.1|1.4.2|...|1.5.3] would require
│ │ └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
│ ├─ pandas [1.4.1|1.4.2|...|1.5.3] would require
│ │ └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
│ └─ pandas [1.5.1|1.5.2|1.5.3] would require
│ └─ python >=3.11,<3.12.0a0 , which conflicts with any installable versions previously reported;
└─ xeofs [1.2.1|1.2.2|...|3.0.4] would require
└─ python >=3.10,<3.12 but there are no viable options
├─ python [3.10.0|3.10.1|...|3.10.9] conflicts with any installable versions previously reported;
├─ python [3.11.0|3.11.1|...|3.11.9] conflicts with any installable versions previously reported;
└─ python 3.12.0rc3 would require
└─ _python_rc, which does not exist (perhaps a missing channel).

Pins seem to be involved in the conflict. Currently pinned specs:

Do you have any suggestions how I can modify my environment(s) ?

view this post on Zulip Katelyn FitzGerald (Feb 18 2025 at 21:25):

It looks like xeofs isn't supported for Python 3.12 yet (via install from conda-forge) and I think the latest NPL uses 3.12. Is using an older verison of NPL as a starting point an option for you?

I can't quite tell what's going on here with DataTree, but there might be some versioning things with that as well. It started as an independent project, but now has been merged into the xarray package (as of v2024.10.0).

view this post on Zulip Katelyn FitzGerald (Feb 18 2025 at 21:49):

It looks like they have made the updates (to support Python 3.12) in the xeofs repo though and on PyPI just not conda. You might be able to pip install it or install from source in your environment.

view this post on Zulip Mari Tye (Feb 18 2025 at 21:50):

Thank you! Rolling back a few versions of environment to install xeofs also worked as an alternative.

view this post on Zulip Katelyn FitzGerald (Feb 20 2025 at 15:25):

A quick follow up here - there's now a release on conda-forge with the updated requirements info (i.e. allowing for Python 3.12 and hopefully addressing the DataTree issue)


Last updated: May 16 2025 at 17:14 UTC