whitphx / lear-gist-python

A python wrapper for Lear's GIST implementation working with numpy
MIT License
55 stars 14 forks source link

fftw3: no such file or directory #7

Closed FireJohnny closed 7 years ago

FireJohnny commented 7 years ago

I have install the FFTW3 but when I run python setup.py build_ext the error show with lq@lq-virtual-machine:~/下载/lear-gist-python-master$ python setup.py build_ext -I /usr/local/include -L /usr/local/lib running build_ext building 'gist' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lq/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/home/lq/anaconda2/include/python2.7 -c lear_gist-1.2/gist.c -o build/temp.linux-x86_64-2.7/lear_gist-1.2/gist.o -DUSE_GIST -DSTANDALONE_GIST lear_gist-1.2/gist.c:14:19: fatal error: fftw3.h: 没有那个文件或目录 compilation terminated. error: command 'gcc' failed with exit status 1

the chinesemeans : no such file or directory

whitphx commented 7 years ago

It seems FFTW is not installed at /usr/local/include and /usr/local/lib. Please check fftw3.h exists in /usr/local/include and libfftw3f.a exists in /usr/local/lib.

ls /usr/local/include/fftw3.h
ls /usr/local/lib/libfftw3f.a

Alternatively, you can specify the installation path of FFTW by setting --prefix option to ./configure at building it. For example,

 ./configure --enable-single --enable-shared --prefix=$HOME/local

then FFTW will be installed in ~/local like ~/local/include/fftw3.h and ~/local/lib/libfftw3f.a. After that, you can build lear-gist-python by

$ python setup.py build_ext -I $HOME/local/include -L $HOME/local/lib

I updated README during writing this answer, so please check it too.

Thank you.