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 issue: ImportError: cannot import name 'cumtrapz' from 'scipy.integrate #91

Open
lucaducceschi opened this issue Sep 20, 2024 · 3 comments

Comments

@lucaducceschi
Copy link

Scipy changed the name of cumptraz function to "cumulative_trapezoid". Pip installs the newer version of scipy ('1.14.1'), but the requirements.txt file reports version 1.10.0.

@Fan-loewe
Copy link

@lucaducceschi Hi Luca, did you find a solution for that? I met the same problem

@lucaducceschi
Copy link
Author

I needed to run Disvoice on Colab. There, the solution is to downgrade Scipy

!pip install scipy==1.10.0

Install these versions of the other dependencies:

!pip install phonet==0.3.7
!pip install kaldi_io==0.9.4
!pip install librosa==0.9.1

Go the Disvoice directory and run the setup.py file

cd DisVoice
!python setup.py install

Then, rename two directories using lower case characters (which is what was creating the issue in my case):

cp ./disvoice/glottal/Glottal.py ./disvoice/glottal/glottal.py
cp ./disvoice/prosody/Prosody.py ./disvoice/prosody/prosody.py

Locally, I don't know if this is enough (it should be). Let me know if that helps.

@Fan-loewe
Copy link

Fan-loewe commented Jan 17, 2025

@lucaducceschi Hi Luca, thank you for the reply!

I still used scipy ('1.14.1'). Following your comment, I changed "cumptraz" to "cumulative_trapezoid".

Besides, additional changes are needed to run glottal.py. I attach here in case others need:

for utils_gci.py, update to:
from scipy.signal import medfilt, filtfilt, buttord, butter, lfiltic, lfilter
from scipy.signal.windows import blackman, hamming, hann

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

2 participants