whitphx / lear-gist-python

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

Problems of Build and install Part #9

Closed siyitao closed 7 years ago

siyitao commented 7 years ago

I tried to run this line of code,

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

It shows:

running build_ext building 'gist' extension gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/Users/siyi/anaconda/include/python3.6m -c lear_gist-1.2/gist.c -o build/temp.macosx-10.7-x86_64-3.6/lear_gist-1.2/gist.o -DUSE_GIST -DSTANDALONE_GIST gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/Users/siyi/anaconda/include/python3.6m -c lear_gist-1.2/standalone_image.c -o build/temp.macosx-10.7-x86_64-3.6/lear_gist-1.2/standalone_image.o -DUSE_GIST -DSTANDALONE_GIST gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/include -arch x86_64 -I/Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/Users/siyi/anaconda/include/python3.6m -c gistmodule.c -o build/temp.macosx-10.7-x86_64-3.6/gistmodule.o -DUSE_GIST -DSTANDALONE_GIST In file included from gistmodule.c:3: In file included from /Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18: In file included from /Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788: /Users/siyi/anaconda/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^ 1 warning generated. creating build/lib.macosx-10.7-x86_64-3.6 gcc -bundle -undefined dynamic_lookup -L/Users/siyi/anaconda/lib -L/Users/siyi/anaconda/lib -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/lear_gist-1.2/gist.o build/temp.macosx-10.7-x86_64-3.6/lear_gist-1.2/standalone_image.o build/temp.macosx-10.7-x86_64-3.6/gistmodule.o -L/usr/local/lib -L/Users/siyi/anaconda/lib -lfftw3f -o build/lib.macosx-10.7-x86_64-3.6/gist.cpython-36m-darwin.so

I would like to know where the problem is.

Thanks!

siyitao commented 7 years ago

I solved this problem by:

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

If someone meets the same problem, hope it can help you.