0

Hi I am having a little trouble with the module spectrogram which I need to use in order to create spectrograms from my wav files.

I repeatedly get the error message No module named spectrogram when importing on my Windows which is running Python version 2.7.12. In contrast when importing the module on my mac which runs version 2.7.11 I have no problems. I can't find anything that suggests that this is a version specific problem and was hoping someone might be able to help me fix this.

Here is the code I am using to import the needed modules. This runs absolutely fine on my mac, but won't run on Windows.

    import glob
    import numpy as np
    import scipy.io import wavfile
    import spectrogram as sp
    import os
    import matplotlib.pyplot as plt
  • Have you tried to import using its full path, something like `import scipy.signal.spectrogram` if that is the thing you mentioned? – Chazeon Feb 20 '17 at 14:01
  • Or can you give a link to the `spectrogram` you refer to? I didn't find a `spectrogram` model. – Chazeon Feb 20 '17 at 14:03
  • Thanks, I have tried importing using the whole path, it comes up with the same error message. I don't have a link to the spectrogram, its from code I have been given by someone else which runs fine on my mac –  Feb 20 '17 at 17:03

1 Answers1

0

Spectrogram is a part of scipy, you must make that known.

from scipy import signal
signal.spectrogram(bla,bla,bla)
apoorlydrawnape
  • 288
  • 3
  • 12