BUG: preliz import might break pymc import via scipy
dirknbr opened this issue · comments
Describe the issue:
This is via a colab
I suspect that preliz install breaks some of the pymc dependencies
Reproduceable code example:
import arviz as az
import bayeux as bx
import jax
import matplotlib.pyplot as plt
import numpy as np
import tensorflow_probability.substrates.jax as tfp
import pymc as pm
from scipy import stats
import preliz
tfd = tfp.distributions
Error message:
ImportError Traceback (most recent call last)
<ipython-input-5-6bd83c27ee19> in <cell line: 7>()
5 import numpy as np
6 import tensorflow_probability.substrates.jax as tfp
----> 7 import pymc as pm
8 from scipy import stats
9 import preliz
4 frames
/usr/local/lib/python3.10/dist-packages/scipy/cluster/vq.py in <module>
68 import numpy as np
69 from collections import deque
---> 70 from scipy._lib._array_api import (
71 as_xparray, array_namespace, size, atleast_nd, copy, cov
72 )
ImportError: cannot import name 'as_xparray' from 'scipy._lib._array_api' (/usr/local/lib/python3.10/dist-packages/scipy/_lib/_array_api.py)
PyMC version information:
see above
Context for the issue:
No response
Can you share a colab? Perhaps preliz is not pinning scipy well enough? CC @aloctavodia
It seems I cannot reproduce it myself, so maybe we can close it
https://colab.research.google.com/drive/1ZNPl0SM8DgXLK8IVUN9mSl0yr80YVYmw#scrollTo=AhcnyHugbi0o
Just for reference PyMC asks for scipy>=1.4.1 and PreliZ "scipy>=1.10, <1.13"