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

Scipy version mismatch when installing with Python 3.9 #1229

Closed
Deepa-Tilwani opened this issue Aug 21, 2024 · 5 comments · Fixed by #1233
Closed

Scipy version mismatch when installing with Python 3.9 #1229

Deepa-Tilwani opened this issue Aug 21, 2024 · 5 comments · Fixed by #1233
Labels
bug Something isn't working

Comments

@Deepa-Tilwani
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Version SBI : 0.22.0
from sbi.inference import SNPE, prepare_for_sbi, simulate_for_sbi

Expected behavior
image

Additional context
I tried with scipy 1.13.0. It failed.
Scipy version >1.9.0 does not import the required functions. I have to downgrade which is a dependency issue with other packages.

@Deepa-Tilwani Deepa-Tilwani added the bug Something isn't working label Aug 21, 2024
@janfb
Copy link
Contributor

janfb commented Aug 21, 2024

Thanks for reporting this. Which python version are you using?
In my experience, the issue is solved when you install everything in a clean environment that has python 3.12 installed. E.g.,

conda create -n sbi python=3.12
conda activate sbi
pip install sbi

and then test it in a python shell:

python
import sbi
from sbi.inference import SNPE, prepare_for_sbi, simulate_for_sbi

Does that work?

@Deepa-Tilwani
Copy link
Author

Deepa-Tilwani commented Aug 21, 2024 via email

@janfb
Copy link
Contributor

janfb commented Aug 21, 2024

maybe you can give it another try with 3.10, see here:
#1212 (comment)

@janfb janfb changed the title Scipy version is not updated Scipy version mismatch when installing with Python 3.9 Aug 21, 2024
@Deepa-Tilwani
Copy link
Author

Deepa-Tilwani commented Aug 21, 2024

okay yes with Python 3.9 it is not working for sure. Python 3.12 I was able to import it. Can you update the versions needed for installation in the readme or requirements?
It will be easier for new bees to start. Thanks.

On installation page it is :
https://sbi-dev.github.io/sbi/latest/install/

Create an environment for sbi (indicate Python 3.6 or higher); activate it
$ conda create -n sbi_env python=3.7 && conda activate sbi_env

@janfb
Copy link
Contributor

janfb commented Aug 21, 2024

Great that it is working for you now.

Thanks for pointing me to the install instruction on the website, those are definitively out of date and we will update them soon.

In the repository readme, we require python>3.8. We will think about moving up to 3.10, which will then resolve this issue that seems to apply only to 3.9.

I will leave this issue here open in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants