intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
447 stars 49 forks source link

Installation fails on Ubuntu 22.04 with several errors including "too few arguments to function ‘_Py_HashDouble’" #42

Closed mendhak closed 1 year ago

mendhak commented 1 year ago

Installation fails on Ubuntu 22.04. It seems to be trying to build a wheel, but I am not familiar enough with Python to understand what is failing and what the resolution might be. I've tried cleaning and rerunning the installer sevearl times, but it fails at the same spot. I do see a pull request was done where the author got it to work on Ubuntu 22.04 so I'm wondering what's missing? Any ideas or tips to try?

The log output is massive so I've had to attach it as a file. output.txt

A random section of some errors are here:

numpy/core/src/multiarray/scalartypes.c.src:3325:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             3325 |     hashimag = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             3326 |             (((PyC@name@ScalarObject *)obj)->obval).imag);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3325:16: error: too few arguments to function ‘_Py_HashDouble’
             3325 |     hashimag = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3311:27: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             3311 |     return _Py_HashDouble((double) ((Py@name@ScalarObject *)obj)->obval);
                  |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |                           |
                  |                           double
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3311:12: error: too few arguments to function ‘_Py_HashDouble’
             3311 |     return _Py_HashDouble((double) ((Py@name@ScalarObject *)obj)->obval);
                  |            ^~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3319:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             3319 |     hashreal = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             3320 |             (((PyC@name@ScalarObject *)obj)->obval).real);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3319:16: error: too few arguments to function ‘_Py_HashDouble’
             3319 |     hashreal = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3325:31: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             3325 |     hashimag = _Py_HashDouble((double)
                  |                               ^~~~~~~~
                  |                               |
                  |                               double
             3326 |             (((PyC@name@ScalarObject *)obj)->obval).imag);
                  |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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);
                  |                                      ^~~~~~~~~~
            x86_64-linux-gnu-gcc: numpy/core/src/multiarray/usertypes.c
            numpy/core/src/multiarray/scalartypes.c.src:3325:16: error: too few arguments to function ‘_Py_HashDouble’
             3325 |     hashimag = _Py_HashDouble((double)
                  |                ^~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3341:27: error: incompatible type for argument 1 of ‘_Py_HashDouble’
             3341 |     return _Py_HashDouble(npy_half_to_double(((PyHalfScalarObject *)obj)->obval));
                  |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |                           |
                  |                           double
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3341:12: error: too few arguments to function ‘_Py_HashDouble’
             3341 |     return _Py_HashDouble(npy_half_to_double(((PyHalfScalarObject *)obj)->obval));
                  |            ^~~~~~~~~~~~~~
            In file included from /usr/include/python3.10/Python.h:77,
                             from numpy/core/src/multiarray/scalartypes.c.src:3:
            /usr/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:3312:1: warning: control reaches end of non-void function [-Wreturn-type]
             3312 | }
                  | ^
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘float_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:3312:1: warning: control reaches end of non-void function [-Wreturn-type]
             3312 | }
                  | ^
            numpy/core/src/multiarray/scalartypes.c.src: In function ‘half_arrtype_hash’:
            numpy/core/src/multiarray/scalartypes.c.src:3342:1: warning: control reaches end of non-void function [-Wreturn-type]
             3342 | }
RyanMetcalfeInt8 commented 1 year ago

Hi @mendhak, in model-requirements.txt, can you try changing line 2: openvino-dev==2022.2.0 to openvino-dev==2022.3.0

Remove 'model_conv' folder (created from previous install.sh run), and re-run install.sh?

mendhak commented 1 year ago

Oh nice, that's done it. I did a git clean -fdx , changed the model-requirements.txt file, and reran ./install.sh. The installation went smoothly after making that change. Many thanks! Please feel free to close the issue

image

RyanMetcalfeInt8 commented 1 year ago

Oh nice, that's done it.

Glad to hear!