sbi icon indicating copy to clipboard operation
sbi copied to clipboard

prepare_for_sbi causes import error with the latest scipy

Open jiseonmin opened this issue 3 months ago • 1 comments

Hi, just a heads-up, if you have scipy version>=1.13.0, you will get an import error because of an issue with arviz. (https://discourse.pymc.io/t/importerror-cannot-import-name-gaussian-from-scipy-signal/14170)

In other words, if you do: from sbi.inference import prepare_for_sbi

You will get something like:

from scipy.signal import convolve, convolve2d, gaussian  # pylint: disable=no-name-in-module
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'gaussian' from 'scipy.signal'

You can fix it by downgrading your scipy to 1.12.0, for instance.

jiseonmin avatar Apr 03 '24 23:04 jiseonmin

thanks for the heads-up @jiseonmin !

This should now be fixed with https://github.com/arviz-devs/arviz/releases/tag/v0.18.0, i.e., by using arviz==0.18.0, no?

janfb avatar Apr 12 '24 08:04 janfb