exoplanet-dev / exoplanet

Fast & scalable MCMC for all your exoplanet needs!
https://docs.exoplanet.codes
MIT License
206 stars 52 forks source link

Conflicts with current version of arviz/xarray #310

Closed gjgilbert closed 6 months ago

gjgilbert commented 11 months ago

Describe the bug In a clean conda environment, exoplanet fails to import, raising two dozen or so traceback errors leading through exoplanet --> pymc3 --> arviz --> xarray.

Forcing xarray==2022.9.0 fixes the issue, and also sets arviz==0.12.1

To Reproduce In terminal:

conda create --name test1
conda activate test1
python -m pip install -U exoplanet

In python: import exoplanet

Expected behavior Exoplanet should work on pip installation.

Inside the clean conda environment, running

python -m pip install -U exoplanet
pip install xarray==2022.9.0

seems to fix the issue

Your setup (please complete the following information):

Additional context I think the root issue is conflicting numpy requirements, but I haven't investigated any further.

dfm commented 11 months ago

Thanks! We've fixed this in a few places, but it hasn't been propagated to exoplanet yet. Over in #309, it's fixed using the following requirements:

"pymc3>=3.9", "numpy<1.22", "xarray<2023.10.0"

Would you be willing to open a PR to the main branch adding a constraint like this so that we can release an update sooner?

gjgilbert commented 11 months ago

Opened a PR #311. In the future for small issues such as this would it be better to make a PR directly rather than opening an issue?

dfm commented 11 months ago

Thank you!! Either way is totally fine with me. Small PRs are the absolute best, but issues are also useful for tracking. Whichever is best for you! Thanks again!

dfm commented 6 months ago

Fixed in #309 and #311