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

ifft module cannot be imported from scipy #109

Open
Jiadalee opened this issue Dec 18, 2024 · 3 comments
Open

ifft module cannot be imported from scipy #109

Jiadalee opened this issue Dec 18, 2024 · 3 comments

Comments

@Jiadalee
Copy link

I installed the omnipose using pip and then tried to start it with command python -m omnipose, but got the following error:

Traceback (most recent call last):
File "", line 189, in run_module_as_main
File "", line 148, in get_module_details
File "", line 112, in get_module_details
File "C:\Users\jyl51\AppData\Local\Programs\Python\Python312\Lib\site-packages\omnipose_init
.py", line 1, in
from . import core, utils, loss, plot, misc, cli, data, gpu
File "C:\Users\jyl51\AppData\Local\Programs\Python\Python312\Lib\site-packages\omnipose\misc.py", line 648, in
import peakdetect
File "C:\Users\jyl51\AppData\Local\Programs\Python\Python312\Lib\site-packages\peakdetect_init
.py", line 3, in
from .peakdetect import *
File "C:\Users\jyl51\AppData\Local\Programs\Python\Python312\Lib\site-packages\peakdetect\peakdetect.py", line 5, in
from scipy import fft, ifft
ImportError: cannot import name 'ifft' from 'scipy' (C:\Users\jyl51\AppData\Local\Programs\Python\Python312\Lib\site-packages\scipy_init.py). Did you mean: 'fft'?

Seems that the 'ifft' is depreciated from the scipy? See error message screenshot below

image

@kevinjohncutler
Copy link
Owner

@Jiadalee That is due to the peakdetect dependency, but that has been removed. I need to update the pypi release.

@Jiadalee
Copy link
Author

Jiadalee commented Jan 2, 2025

@kevinjohncutler great. I was suspecting the ifft module is depreciated in python...

@Aurelien-Gg
Copy link

Aurelien-Gg commented Feb 24, 2025

Possible fix (?) :
in /site-packages/peakdetect/peakdetect.py:
changing "from scipy import fft, ifft"
to "from scipy.fft import fft, ifft"

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

3 participants