pip install problems with matplotlib and scipy: Unicode deprecated? (Intel Mac, Catalina)

Viewed 530

I'm trying a clean install of Qiskit using Anaconda, on an Intel Mac Catalina. The pip install installs a bunch of stuff okay, but when it gets to matplotlib, the most recent version doesn't clang properly, so it tries an earlier version, and works backward version by version until it eventually succeeds (I think) with 3.0.3.

Same thing happens with scipy. Starts from the most recent, fails, and tries the next-oldest. Currently trying 1.3.3 and still going :-(.

 1002  conda create -n QISK python=3
 1003  conda activate QISK
 1004  pip install qiskit
 1005  pip install 'qiskit[visualation]'
 1006  pip install 'qiskit[visualization]'

I get things like this:

      compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_CBLAS -DNO_ATLAS_INFO=-1 -I/opt/local/include -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/umath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.9-x86_64-3.1/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/Users/rdv/opt/anaconda3/envs/QISK/include/python3.10 -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -c'
      clang: build/src.macosx-10.9-x86_64-3.1/numpy/core/src/multiarray/scalartypes.c
      numpy/core/src/multiarray/scalartypes.c.src:475:17: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
          ip = dptr = PyUnicode_AS_UNICODE(self);
                      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:279:7: note: expanded from macro 'PyUnicode_AS_UNICODE'
            PyUnicode_AsUnicode(_PyObject_CAST(op)))
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:481:11: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
          new = PyUnicode_FromUnicode(ip, len);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:475:17: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
          ip = dptr = PyUnicode_AS_UNICODE(self);
                      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:279:7: note: expanded from macro 'PyUnicode_AS_UNICODE'
            PyUnicode_AsUnicode(_PyObject_CAST(op)))
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:476:11: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
          len = PyUnicode_GET_SIZE(self);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:481:11: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
          new = PyUnicode_FromUnicode(ip, len);
                ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:1849:18: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
              buffer = PyUnicode_AS_DATA(self);
                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:283:21: note: expanded from macro 'PyUnicode_AS_DATA'
          ((const char *)(PyUnicode_AS_UNICODE(op)))
                          ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:279:7: note: expanded from macro 'PyUnicode_AS_UNICODE'
            PyUnicode_AsUnicode(_PyObject_CAST(op)))
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:1850:18: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
              buflen = PyUnicode_GET_DATA_SIZE(self);
                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:268:6: note: expanded from macro 'PyUnicode_GET_DATA_SIZE'
          (PyUnicode_GET_SIZE(op) * Py_UNICODE_SIZE)
           ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:1850:18: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
              buflen = PyUnicode_GET_DATA_SIZE(self);
                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:268:6: note: expanded from macro 'PyUnicode_GET_DATA_SIZE'
          (PyUnicode_GET_SIZE(op) * Py_UNICODE_SIZE)
           ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:1850:18: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
              buflen = PyUnicode_GET_DATA_SIZE(self);
                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:268:6: note: expanded from macro 'PyUnicode_GET_DATA_SIZE'
          (PyUnicode_GET_SIZE(op) * Py_UNICODE_SIZE)
           ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      numpy/core/src/multiarray/scalartypes.c.src:3311:71: error: too few arguments to function call, expected 2, have 1
          return _Py_HashDouble((double) ((PyFloatScalarObject *)obj)->obval);
                 ~~~~~~~~~~~~~~                                             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3320:56: error: too few arguments to function call, expected 2, have 1
                  (((PyCFloatScalarObject *)obj)->obval).real);
                                                             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3326:56: error: too few arguments to function call, expected 2, have 1
                  (((PyCFloatScalarObject *)obj)->obval).imag);
                                                             ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3311:76: error: too few arguments to function call, expected 2, have 1
          return _Py_HashDouble((double) ((PyLongDoubleScalarObject *)obj)->obval);
                 ~~~~~~~~~~~~~~                                                  ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3320:61: error: too few arguments to function call, expected 2, have 1
                  (((PyCLongDoubleScalarObject *)obj)->obval).real);
                                                                  ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3326:61: error: too few arguments to function call, expected 2, have 1
                  (((PyCLongDoubleScalarObject *)obj)->obval).imag);
                                                                  ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      numpy/core/src/multiarray/scalartypes.c.src:3341:81: error: too few arguments to function call, expected 2, have 1
          return _Py_HashDouble(npy_half_to_double(((PyHalfScalarObject *)obj)->obval));
                 ~~~~~~~~~~~~~~                                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyhash.h:10:1: note: '_Py_HashDouble' declared here
      PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
      ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/pyport.h:703:34: note: expanded from macro 'PyAPI_FUNC'
      #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
                                       ^
      /Users/rdv/opt/anaconda3/envs/QISK/include/python3.10/exports.h:21:36: note: expanded from macro 'Py_EXPORTED_SYMBOL'
              #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
                                         ^
      14 warnings and 7 errors generated.
      error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/rdv/opt/anaconda3/envs/QISK/include -fPIC -O2 -isystem /Users/rdv/opt/anaconda3/envs/QISK/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_CBLAS -DNO_ATLAS_INFO=-1 -I/opt/local/include -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/umath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.9-x86_64-3.1/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/Users/rdv/opt/anaconda3/envs/QISK/include/python3.10 -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/common -Ibuild/src.macosx-10.9-x86_64-3.1/numpy/core/src/npymath -c build/src.macosx-10.9-x86_64-3.1/numpy/core/src/multiarray/scalartypes.c -o build/temp.macosx-10.9-x86_64-3.10/build/src.macosx-10.9-x86_64-3.1/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.macosx-10.9-x86_64-3.10/build/src.macosx-10.9-x86_64-3.1/numpy/core/src/multiarray/scalartypes.o.d" failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Users/rdv/opt/anaconda3/envs/QISK/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-install-n2ni8t4e/numpy_32ad5878958e4bcfb8d7a6b0fb771438/setup.py'"'"'; __file__='"'"'/private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-install-n2ni8t4e/numpy_32ad5878958e4bcfb8d7a6b0fb771438/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-record-0tjssj4c/install-record.txt --single-version-externally-managed --prefix /private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-build-env-x3hq03xw/overlay --compile --install-headers /private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-build-env-x3hq03xw/overlay/include/python3.10/numpy Check the logs for full command output.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/48/74/ed053620f675ce5408b8dda34949fdc403e5f40db779c07a4436631dcbfb/scipy-1.4.0.tar.gz#sha256=31f7cfa93b01507c935c12b535e24812594002a02a56803d7cd063e9920d25e8 (from https://pypi.org/simple/scipy/) (requires-python:>=3.5). Command errored out with exit status 1: /Users/rdv/opt/anaconda3/envs/QISK/bin/python /private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-standalone-pip-3c7yzb34/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/cw/3nx1g5cd2_vc6dn637d1gyl40000gn/T/pip-build-env-x3hq03xw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.13' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'pybind11>=2.2.4' Check the logs for full command output.
  Downloading scipy-1.3.3.tar.gz (23.8 MB)

As a complete guess, the Anaconda python (3.10) isn't completely isolated from other installs on the system, despite being in Anaconda, and it's a header conflict somewhere? Any thoughts?

FWIW:

(QISK) rdv@Van-Meter-Rodneys-MacBook-Pro quantum % clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
1 Answers

Here's a Numpy bug report for it: https://github.com/numpy/numpy/issues/19033

From the comments:

Note that 1.20.x doesn't support Python 3.10. Can you try the nightly build?

Then from the taglist of the fixing commit: https://github.com/numpy/numpy/commit/ad2a73c18dcff95d844c382c94ab7f73b5571cf3 we can see it went into Numpy 1.21.

You can then check if maplotlib and scipy support Numpy 1.21 or not:

Nympy: https://github.com/matplotlib/matplotlib/blob/c4082c17f62e34ec72b4b72b2df7de20f0233b4d/setup.py#L312

install_requires=[,
   "numpy>=1.19",

so yes, scipy:

np_minversion = '1.19.5'
np_maxversion = '9.9.99'

if IS_RELEASE_BRANCH: req_np = 'numpy>={},<{}'.format(np_minversion, np_maxversion) else: req_np = 'numpy>={}'.format(np_minversion)

so also yes.

In my case I saw this problem because I had numpy==1.17.4 explicitly on my requirements.txt, otherwise the newer numpy would have been picked and I wouldn't have seen it.

Related