Repository: open-compass/VLMEvalKit
Issue: Numpy compliation issue during installing
Root cause: External Dependency Breakage

Hello. I created a new conda environment to install this project with python 3.10. According to the error message below it seems like numpy was unable to find the right blas library. 

c/umath -Inumpy/core/src/npysort -I/home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -c'
            gcc: numpy/core/src/multiarray/alloc.c
            gcc: numpy/core/src/multiarray/buffer.c
            gcc: numpy/core/src/multiarray/common.c
            gcc: numpy/core/src/multiarray/array_assign_scalar.c
            gcc: numpy/core/src/multiarray/descriptor.c
            gcc: numpy/core/src/multiarray/conversion_utils.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/multiarray/einsum.c
            gcc: numpy/core/src/multiarray/datetime_strings.c
            gcc: numpy/core/src/multiarray/arrayobject.c
            gcc: numpy/core/src/multiarray/array_assign_array.c
            gcc: numpy/core/src/multiarray/ctors.c
            gcc: numpy/core/src/multiarray/convert.c
            gcc: numpy/core/src/multiarray/calculation.c
            gcc: numpy/core/src/multiarray/datetime_busday.c
            gcc: numpy/core/src/multiarray/arrayfunction_override.c
            gcc: numpy/core/src/multiarray/convert_datatype.c
            gcc: numpy/core/src/multiarray/hashdescr.c
            gcc: numpy/core/src/multiarray/datetime_busdaycal.c
            gcc: numpy/core/src/multiarray/item_selection.c
            gcc: numpy/core/src/multiarray/compiled_base.c
            gcc: numpy/core/src/multiarray/dragon4.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/multiarray/arraytypes.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/multiarray/lowlevel_strided_loops.c
            gcc: numpy/core/src/multiarray/multiarraymodule.c
            gcc: numpy/core/src/multiarray/datetime.c
            gcc: numpy/core/src/multiarray/dtype_transfer.c
            gcc: numpy/core/src/multiarray/nditer_constr.c
            gcc: numpy/core/src/multiarray/iterators.c
            gcc: numpy/core/src/multiarray/refcount.c
            gcc: numpy/core/src/multiarray/scalarapi.c
            gcc: numpy/core/src/multiarray/nditer_pywrap.c
            gcc: numpy/core/src/multiarray/sequence.c
            gcc: numpy/core/src/multiarray/shape.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.c
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘float_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2967:27: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2967:12: error: too few arguments to function ‘_Py_HashDouble’
             2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
                  |            ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘cfloat_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2975:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2975 |     hashreal = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             2976 |             PyArrayScalar_VAL(obj, C@name@).real);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2975:16: error: too few arguments to function ‘_Py_HashDouble’
             2975 |     hashreal = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2981:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2981 |     hashimag = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             2982 |             PyArrayScalar_VAL(obj, C@name@).imag);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2981:16: error: too few arguments to function ‘_Py_HashDouble’
             2981 |     hashimag = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘longdouble_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2967:27: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2967:12: error: too few arguments to function ‘_Py_HashDouble’
             2967 |     return _Py_HashDouble((double) PyArrayScalar_VAL(obj, @name@));
                  |            ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘clongdouble_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2975:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2975 |     hashreal = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             2976 |             PyArrayScalar_VAL(obj, C@name@).real);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2975:16: error: too few arguments to function ‘_Py_HashDouble’
             2975 |     hashreal = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2981:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2981 |     hashimag = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             2982 |             PyArrayScalar_VAL(obj, C@name@).imag);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2981:16: error: too few arguments to function ‘_Py_HashDouble’
             2981 |     hashimag = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘half_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2997:27: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
                  |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |                           |
                  |                           double
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:38: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘double’
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                                      ^~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src:2997:12: error: too few arguments to function ‘_Py_HashDouble’
             2997 |     return _Py_HashDouble(npy_half_to_double(PyArrayScalar_VAL(obj, Half)));
                  |            ^~~~~~~~~~~~~~
            In file included from /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10/pyhash.h:10:23: note: declared here
               10 | PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
                  |                       ^~~~~~~~~~~~~~
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘longdouble_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2968:1: warning: control reaches end of non-void function [-Wreturn-type]
             2968 | }
                  | ^
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘float_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2968:1: warning: control reaches end of non-void function [-Wreturn-type]
             2968 | }
                  | ^
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘half_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:2998:1: warning: control reaches end of non-void function [-Wreturn-type]
             2998 | }
                  | ^
            gcc: numpy/core/src/multiarray/temp_elide.c
            gcc: numpy/core/src/multiarray/vdot.c
            gcc: numpy/core/src/umath/umathmodule.c
            gcc: numpy/core/src/multiarray/typeinfo.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/loops.c
            gcc: numpy/core/src/multiarray/usertypes.c
            gcc: numpy/core/src/multiarray/number.c
            gcc: numpy/core/src/umath/reduction.c
            gcc: numpy/core/src/umath/ufunc_object.c
            gcc: numpy/core/src/umath/ufunc_type_resolution.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/multiarray/nditer_templ.c
            gcc: numpy/core/src/multiarray/flagsobject.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/npymath/ieee754.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/npymath/npy_math_complex.c
            gcc: numpy/core/src/multiarray/getset.c
            gcc: numpy/core/src/umath/override.c
            gcc: numpy/core/src/npymath/halffloat.c
            gcc: numpy/core/src/multiarray/nditer_api.c
            gcc: numpy/core/src/common/array_assign.c
            gcc: numpy/core/src/common/ucsnarrow.c
            gcc: numpy/core/src/npymath/npy_math.c
            gcc: numpy/core/src/common/mem_overlap.c
            gcc: numpy/core/src/common/ufunc_override.c
            gcc: numpy/core/src/common/numpyos.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/common/npy_cpu_features.c
            gcc: numpy/core/src/common/npy_longdouble.c
            gcc: numpy/core/src/umath/extobj.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/scalarmath.c
            gcc: numpy/core/src/multiarray/mapping.c
            gcc: numpy/core/src/multiarray/methods.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/matmul.c
            gcc: build/src.linux-x86_64-3.10/numpy/core/src/umath/clip.c
            error: Command "gcc -pthread -B /home/ubuntu/mambaforge-pypy3/envs/vlme/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/ubuntu/mambaforge-pypy3/envs/vlme/include -fPIC -O2 -isystem /home/ubuntu/mambaforge-pypy3/envs/vlme/include -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/home/ubuntu/mambaforge-pypy3/envs/vlme/include/python3.10 -Ibuild/src.linux-x86_64-3.10/numpy/core/src/common -Ibuild/src.linux-x86_64-3.10/numpy/core/src/npymath -c build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.c -o build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.10/numpy/core/src/multiarray/scalartypes.o.d" failed with exit status 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
      Failed to build numpy
      ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
      [end of output]

Hi, @findalexli ,

Sorry that I failed to produce your issue: I created a new conda env w. python=3.10 via `conda create -n py310 python=3.10` (using anaconda3). When the env is created, numpy with a new enough version is already installed. 

Would you please provide a list of command for me to reproduce your error (also with your environment info)?

Closed due to no response, feel free to reopen if the error still occurs.