HERA-Team / aipy

Astronomical Interferometry in PYthon (AIPY)
http://pypi.python.org/pypi/aipy
Other
43 stars 29 forks source link

Aipy installing error #9

Closed jcguevarag closed 7 years ago

jcguevarag commented 7 years ago

I've been trying to install Aipy with the https://github.com/AaronParsons/aipy instructions. I obtained this error:

root@juan:/home/juan/Downloads/aipy-master# python setup.py install Generating src/version.py: 2.1.0 fatal: Not a git repository (or any of the parent directories): .git Generating src/branch.py fatal: Not a git repository (or any of the parent directories): .git Generating src/gitlog.py.

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/aipy copying src/dsp.py -> build/lib.linux-x86_64-2.7/aipy copying src/interp.py -> build/lib.linux-x86_64-2.7/aipy copying src/fit.py -> build/lib.linux-x86_64-2.7/aipy copying src/src.py -> build/lib.linux-x86_64-2.7/aipy copying src/scripting.py -> build/lib.linux-x86_64-2.7/aipy copying src/twodgauss.py -> build/lib.linux-x86_64-2.7/aipy copying src/phs.py -> build/lib.linux-x86_64-2.7/aipy copying src/healpix.py -> build/lib.linux-x86_64-2.7/aipy copying src/miriad.py -> build/lib.linux-x86_64-2.7/aipy copying src/rfi.py -> build/lib.linux-x86_64-2.7/aipy copying src/deconv.py -> build/lib.linux-x86_64-2.7/aipy copying src/version.py -> build/lib.linux-x86_64-2.7/aipy copying src/map.py -> build/lib.linux-x86_64-2.7/aipy copying src/branch.py -> build/lib.linux-x86_64-2.7/aipy copying src/coord.py -> build/lib.linux-x86_64-2.7/aipy copying src/pol.py -> build/lib.linux-x86_64-2.7/aipy copying src/init.py -> build/lib.linux-x86_64-2.7/aipy copying src/cal.py -> build/lib.linux-x86_64-2.7/aipy copying src/amp.py -> build/lib.linux-x86_64-2.7/aipy copying src/const.py -> build/lib.linux-x86_64-2.7/aipy copying src/img.py -> build/lib.linux-x86_64-2.7/aipy copying src/gitlog.py -> build/lib.linux-x86_64-2.7/aipy creating build/lib.linux-x86_64-2.7/aipy/optimize copying src/optimize/nonlin.py -> build/lib.linux-x86_64-2.7/aipy/optimize copying src/optimize/optimize.py -> build/lib.linux-x86_64-2.7/aipy/optimize copying src/optimize/info.py -> build/lib.linux-x86_64-2.7/aipy/optimize copying src/optimize/anneal.py -> build/lib.linux-x86_64-2.7/aipy/optimize copying src/optimize/init.py -> build/lib.linux-x86_64-2.7/aipy/optimize creating build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/three_cr.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/three_c.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/nvss.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/culgoora.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/mrt.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/gbsix.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/txs.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/misc.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/six_c.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/wenss.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/parkes.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/init.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/vlss.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/helm.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/seven_c.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/four_c.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/paper.py -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/helm_fit.txt -> build/lib.linux-x86_64-2.7/aipy/_src copying src/_src/helm_pos.txt -> build/lib.linux-x86_64-2.7/aipy/_src running build_ext building 'aipy._healpix' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/_healpix creating build/temp.linux-x86_64-2.7/src/_healpix/cxx creating build/temp.linux-x86_64-2.7/src/_healpix/cxx/Healpix_cxx x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -Isrc/_healpix/cxx/cxxsupport -Isrc/_healpix/cxx/Healpix_cxx -I/usr/include/python2.7 -c src/_healpix/healpix_wrap.cpp -o build/temp.linux-x86_64-2.7/src/_healpix/healpix_wrap.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4, from src/_healpix/healpix_wrap.cpp:16: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

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

^ In file included from src/_healpix/healpix_wrap.cpp:18:0: src/_healpix/cxx/Healpix_cxx/healpix_map.h:102:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]

pragma omp parallel

^ src/_healpix/cxx/Healpix_cxx/healpix_map.h:105:0: warning: ignoring #pragma omp for [-Wunknown-pragmas]

pragma omp for schedule (dynamic,5000)

^ src/_healpix/cxx/Healpix_cxx/healpix_map.h:125:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]

pragma omp parallel

^ src/_healpix/cxx/Healpix_cxx/healpix_map.h:128:0: warning: ignoring #pragma omp for [-Wunknown-pragmas]

pragma omp for schedule (dynamic,5000)

^ src/_healpix/healpix_wrap.cpp: In function ‘int HPBObject_init(HPBObject, PyObject, PyObject)’: src/_healpix/healpix_wrap.cpp:90:53: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] static char kwlist[] = {"nside", "scheme", NULL}; ^ src/_healpix/healpix_wrap.cpp:90:53: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] src/_healpix/healpix_wrap.cpp:105:50: error: format not a string literal and no format arguments [-Werror=format-security] PyErr_Format(PyExc_RuntimeError, e.what()); ^ src/_healpix/healpix_wrap.cpp: In function ‘PyObject HPBObject_npix2nside(HPBObject, PyObject)’: src/_healpix/healpix_wrap.cpp:125:50: error: format not a string literal and no format arguments [-Werror=format-security] PyErr_Format(PyExc_RuntimeError, e.what()); ^ src/_healpix/healpix_wrap.cpp: In function ‘PyObject HPBObject_nest_ring_conv(HPBObject, PyObject)’: src/_healpix/healpix_wrap.cpp:154:50: error: format not a string literal and no format arguments [-Werror=format-security] PyErr_Format(PyExc_RuntimeError, e.what()); ^ src/_healpix/healpix_wrap.cpp: In function ‘PyObject HPBObject_crd2px(HPBObject, PyObject, PyObject)’: src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] static char kwlist[] = {"crd1", "crd2", "crd3", "interpolate", NULL}; ^ src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] src/_healpix/healpix_wrap.cpp: In function ‘PyObject HPBObject_px2crd(HPBObject, PyObject, PyObject)’: src/_healpix/healpix_wrap.cpp:263:48: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] static char kwlist[] = {"px", "ncrd", NULL}; ^ src/_healpix/healpix_wrap.cpp:263:48: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] cc1plus: some warnings being treated as errors error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

tamiratgebeyehu commented 7 years ago

Hi, I am getting a similar error when installing aipy. Have you found a solution to this problem?

gijzelaerr commented 7 years ago

https://stackoverflow.com/a/17260886

AaronParsons commented 7 years ago

This issue has been resolved in the latest commit. It originated in a change of policy for string formatting in gcc.

tamiratgebeyehu commented 7 years ago

Thank you very much for resolving it! I just installed aipy in my new PC with Ubuntu16.04 OS.