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

ImportError: cannot import name 'interp' from 'scipy' #691

Open
haim-cohen-moonactive opened this issue Jan 21, 2024 · 7 comments
Open

ImportError: cannot import name 'interp' from 'scipy' #691

haim-cohen-moonactive opened this issue Jan 21, 2024 · 7 comments

Comments

@haim-cohen-moonactive
Copy link

On January 20th, 2024 scypi released version 1.12.0 which broke its compatibility withthe old scikit-plot version 0.37, used by mljar-supervised. Since then, when importing AutoML (from supervised.automl import AutoML) you get the following error:

ImportError: cannot import name 'interp' from 'scipy' (/Users/someuser/temp/venv/lib/python3.9/site-packages/scipy/__init__.py)

It also happens on Python 3.11.7.

WORKAROUND:
Add to requirements.txt scipy==1.11.4, which installs the previous version of scipy.

@pplonski, long-term I guess replacing scikit-plot should take place, as it stopped developing on 2018. As a a quick fix for now, I would add the following to requirements.txt

scipy>=1.6.1,<=1.11.4

instead of scipy>=1.6.1

Thanks!

@namelessperson0
Copy link

I am also facing the same error.
ImportError: cannot import name 'interp' from 'scipy'

@pplonski
Copy link
Contributor

Thank you @haim-cohen-moonactive, I've added limit for scipy version. I will take a look at scikit-plot as well.

@cmontesv
Copy link

cmontesv commented Feb 7, 2024

any clue when requirements.txt file doesn't exist?
thanks

@haim-cohen-moonactive
Copy link
Author

any clue when requirements.txt file doesn't exist? thanks

@cmontesv Just install scipy==1.11.4. If inside a notebook:
%pip install scipy==1.11.4

This will make mljar work again.

@cmontesv
Copy link

cmontesv commented Feb 7, 2024

any clue when requirements.txt file doesn't exist? thanks

@cmontesv Just install scipy==1.11.4. If inside a notebook: %pip install scipy==1.11.4

This will make mljar work again.

it worked, thank you very much

@lzzzhh
Copy link

lzzzhh commented Feb 29, 2024

there is an error ImportError: cannot import name 'reshape' from 'scipy', my scipy version is 1.12.0, python version is 3.9, what version of scipy is suitable for me
then i change my scipy version to 1.6.1, an new error:ImportError: cannot import name 'expm2' from 'scipy.linalg'
Thank!

@pplonski
Copy link
Contributor

Please install scipy 1.11.4, I will fix it tomorrow and do new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants