davidpraise45 / Audio-Signal-Processing

Removing background noise in a sound file
62 stars 30 forks source link

No Module Named scipy.fft #1

Closed rudrathegreat closed 5 years ago

rudrathegreat commented 5 years ago

Hi,

I was experimenting with this code when I came across this error saying-


Traceback (most recent call last):
  File "D:/filename.py", line 41, in <module>
    import scipy.fft
ModuleNotFoundError: No module named 'scipy.fft'

I do have SciPy, NumPy and Matplotlib, but yet the error keeps showing!

Requirements.txt


matplotlib==2.2.2
numpy==1.15.0
pandas==0.23.4
Pillow==5.2.0
PyAudio==0.2.11
scipy==1.1.0

A little help would be great!

rudrathegreat commented 5 years ago

I have found something.

When I am using my IDE editor (PyCharm), I get the error, but when I use Python IDLE, I don't

davidpraise45 commented 5 years ago

Hey, have you tried sudo pip install scipy on your computer, or if your have anaconda installed on your pc you don't have to install it ?

rudrathegreat commented 5 years ago

I don't have the anaconda distribution. However, when I want to check if I have installed some open-source library, like scipy, I simply just try to import it in the Python Shell. If that works, then you know that library has been installed. When I do that with scipy, I find that there is no error, meaning that it is installed.

davidpraise45 commented 5 years ago

I have found something.

When I am using my IDE editor (PyCharm), I get the error, but when I use Python IDLE, I don't

It must be your setup environment with pycharm, go to setting on pycharm and python interpreter and choose the correct interpreter.

rudrathegreat commented 5 years ago

I've already done that, still gives the error!

davidpraise45 commented 5 years ago

My best option is to install anaconda, and use that environment. So you can use it in pycharm and idle.

On Tue, Dec 11, 2018 at 9:20 AM Rudra notifications@github.com wrote:

I've already done that, still gives the error!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/davidpraise45/Audio-Signal-Processing/issues/1#issuecomment-446111891, or mute the thread https://github.com/notifications/unsubscribe-auth/AYvGUrgaElz8AU2XbaNPkFBq79kFBgcZks5u32q7gaJpZM4YwYkE .

rudrathegreat commented 5 years ago

I have finally found out what the problem is!!!!!!!!

But in order to make sure that this is true, I need to ask you a question.

In the line -


from scipy import fft

Are you really try to import this -


from scipy.fftpack import fft

If that is the case, then change the import statement from scipy import fft to from scipy.fftpack import fft

davidpraise45 commented 5 years ago

That's what exactly what I imported fast Fourier transformation (fft)

D.k

On Tue, 11 Dec 2018, 10:34 Rudra, notifications@github.com wrote:

I have finally found out what the problem is!!!!!!!!

But in order to make sure that this is true, I need to ask you a question.

In the line -

from scipy import fft

Are you really try to import this -

from scipy.fftpack import fft

If that is the case, then it sure works for me!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/davidpraise45/Audio-Signal-Processing/issues/1#issuecomment-446134289, or mute the thread https://github.com/notifications/unsubscribe-auth/AYvGUgyVZ5uEMRkcqWZDMmFj1Xz2fdANks5u33w-gaJpZM4YwYkE .

rudrathegreat commented 5 years ago

Cool bananas!!!

P.S - I do not really understand what D.k means... um... explanation

hafez-ahmad commented 4 years ago

this worked for me. from scipy import fft from scipy import ifft

rudrathegreat commented 4 years ago

that was what was in the code. Scipy updated it to -


from scipy.fftpack import fft
WarrenWeckesser commented 3 years ago

FYI: The module scipy.fft was added in version 1.4.0 of SciPy. It is a replacement for the older scipy.fftpack.