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' #156

Closed
turlog opened this issue Jan 23, 2024 · 4 comments · Fixed by #157
Closed

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

turlog opened this issue Jan 23, 2024 · 4 comments · Fixed by #157
Labels
bug Something isn't working

Comments

@turlog
Copy link

turlog commented Jan 23, 2024

  • dython==0.7.4
  • python==3.12

Cannot import module:

>>> import sys, dython
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../dython/__init__.py", line 1, in <module>
    from . import nominal, model_utils, sampling, data_utils
  File ".../dython/model_utils.py", line 4, in <module>
    from scikitplot.helpers import binary_ks_curve
  File ".../scikitplot/__init__.py", line 2, in <module>
    from . import metrics, cluster, decomposition, estimators
  File ".../scikitplot/metrics.py", line 27, in <module>
    from scipy import interp
ImportError: cannot import name 'interp' from 'scipy' (...)

As you can see exception is raised in scikitplot which is not maintained (last commits in 2018).
Current workaround is to pin scipy<1.12.

@turlog turlog added the bug Something isn't working label Jan 23, 2024
@shakedzy
Copy link
Owner

Hey @turlog , I think you figured out the issue - I need to drop the dependency on scikit-plot. It's required only for one function, so I guess it shouldn't be too complicated.

shakedzy added a commit that referenced this issue Jan 27, 2024
@shakedzy shakedzy linked a pull request Jan 27, 2024 that will close this issue
shakedzy added a commit that referenced this issue Jan 27, 2024
#153 add type hints to functions
#156 ImportError: cannot import name 'interp' from 'scipy'
@shakedzy
Copy link
Owner

shakedzy commented Jan 27, 2024

A fix is available in 0.7.5.dev, you can currently install this from source. Version 0.7.5 will be published to PyPi in the next following days

@turlog
Copy link
Author

turlog commented Jan 28, 2024

@shakedzy thanks a lot, I appreciate quick reaction :)

@shakedzy
Copy link
Owner

shakedzy commented Feb 4, 2024

Version 0.7.5 has been published to PyPi

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