# Obspy can't find np.fft.fftpack

**URL:** https://discourse.obspy.org/t/obspy-cant-find-np-fft-fftpack/627
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [March 24, 2017, 6:53am UTC](https://discourse.obspy.org/t/obspy-cant-find-np-fft-fftpack/627 "2017-03-24T06:53:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Phil\_Cummins](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/p/3be4f8/32.png) [@Phil\_Cummins](https://discourse.obspy.org/u/Phil_Cummins)
#### Post date: [March 24, 2017, 6:53am UTC](https://discourse.obspy.org/t/obspy-cant-find-np-fft-fftpack/627/1 "2017-03-24T06:53:39Z")

</div>

Hi,

I am running obspy version 1.0.3 under anaconda, and am using numpy version 1.12.1. My OS is Ubuntu 14.04. A friend sent me an obspy script that does instrument deconvolution using tr.remove\_response, but it encounters the following error:

File “/home/ryanign/ANU-RSES-u5484353/Academics/PhD\_research/02\_HistoricalTsunamis/1992\_Flores/seismic/neic/get\_data\_neic.py”, line 544, in getobs  
tr.remove\_response(pre\_filt=frq4[phase],output=‘DISP’)

File “”, line 2, in remove\_response

File “/home/ryanign/APPS/anaconda/lib/python2.7/site-packages/obspy/core/trace.py”, line 232, in \_add\_processing\_info  
result = func(\*args, \*\*kwargs)

File “/home/ryanign/APPS/anaconda/lib/python2.7/site-packages/obspy/core/trace.py”, line 2596, in remove\_response  
limit\_numpy\_fft\_cache()

File “/home/ryanign/APPS/anaconda/lib/python2.7/site-packages/obspy/core/util/misc.py”, line 511, in limit\_numpy\_fft\_cache  
if not hasattr(np.fft.fftpack, cache):

AttributeError: ‘module’ object has no attribute 'fftpack

When I import numpy.fft, I can see that it indeed does not have the package fftpack. Can anyone suggest a way to work around this problem?

Thanks,

- Phil

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [March 27, 2017, 9:06am UTC](https://discourse.obspy.org/t/obspy-cant-find-np-fft-fftpack/627/2 "2017-03-27T09:06:30Z")

</div>

Hi Phil,

I just tried current conda packages (Linux 64bit) for numpy (version  
1.12.1) from both defaults and conda-forge channel and in both the  
numpy.fft.fftpack submodule is present.

Can you do..?  
- conda list numpy  
- python -c 'import numpy; print(numpy.\_\_version\_\_);  
print(numpy.\_\_file\_\_); print(numpy.fft.fftpack)'

You could also try to remove numpy ("conda remove --force numpy"; option  
--force to not remove other packages that depend on numpy) and install  
it again ("conda install --force numpy"), this might fix it if your  
package installation is broken somehow..

cheers,  
T
