numpy / numpy

The fundamental package for scientific computing with Python.
https://numpy.org
Other
27.97k stars 10.05k forks source link

PyPi package not compatible with CPython nightly (3.7) #10500

Closed ezyang closed 6 years ago

ezyang commented 6 years ago

Steps to reproduce:

  1. Have a build of CPython later than https://github.com/python/cpython/commit/ae3087c6382011c47db82fea4d05f8bbf514265d
  2. With it, do pip install numpy

Expected result: Works Actual result:

 numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’:
    numpy/random/mtrand/mtrand.c:45472:19: error: ‘PyThreadState’ has no member named ‘exc_type’
         *type = tstate->exc_type;
                       ^
    numpy/random/mtrand/mtrand.c:45473:20: error: ‘PyThreadState’ has no member named ‘exc_value’
         *value = tstate->exc_value;
                        ^
    numpy/random/mtrand/mtrand.c:45474:17: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         *tb = tstate->exc_traceback;
                     ^
    numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionReset’:
    numpy/random/mtrand/mtrand.c:45481:22: error: ‘PyThreadState’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    numpy/random/mtrand/mtrand.c:45482:23: error: ‘PyThreadState’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    numpy/random/mtrand/mtrand.c:45483:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    numpy/random/mtrand/mtrand.c:45484:11: error: ‘PyThreadState’ has no member named ‘exc_type’
         tstate->exc_type = type;
               ^
    numpy/random/mtrand/mtrand.c:45485:11: error: ‘PyThreadState’ has no member named ‘exc_value’
         tstate->exc_value = value;
               ^
    numpy/random/mtrand/mtrand.c:45486:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tstate->exc_traceback = tb;

This is Cython generated code; you need to use a newer version of Cython, see https://github.com/cython/cython/issues/1955

charris commented 6 years ago

Yes, we know. Apparently the latest Cython release also fails, we are waiting on Cython 0.28.

Vlad-Shcherbina commented 6 years ago

Cython 0.28 was released recently, but it does not work with it either.

pip install numpy
...
    numpy\random\mtrand\mtrand.c(45472): error C2039: 'exc_type': is not a member of '_ts'
    c:\python37\include\pystate.h(209): note: see declaration of '_ts'
    numpy\random\mtrand\mtrand.c(45473): error C2039: 'exc_value': is not a member of '_ts'
    c:\python37\include\pystate.h(209): note: see declaration of '_ts'
    numpy\random\mtrand\mtrand.c(45474): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\python37\include\pystate.h(209): note: see declaration of '_ts'
...

This is on Windows, with CPython 3.7.0b2 (AMD64) and Cython 0.28.

charris commented 6 years ago

Yep, those members seem to have disappeared somewhere between the Python 3.7 a2 and b2 releases. It's annoying, and one reason we find little reason to test early Python pre-releases. This error should be reported to the Cython folks.

charris commented 6 years ago

Actually, cython 0.28.0 seems to be working here without that error. Not sure why you are seeing it.

charris commented 6 years ago

There is, however, a problem with nose for python 3.7.

charris commented 6 years ago

BTW, pip install will not do the job, it uses source files created with old versions of Cython, you need to download the NumPy repo and compile that.

Vlad-Shcherbina commented 6 years ago

Thank you. I confirm that the install from the source (numpy-1.15.0.dev0+a91f61a) works for me too. Fingers crossed for the PyPI release!

lissyx commented 6 years ago

Not sure if anything changed for that, but we started to test python 3.7.0b4 and pip install numpy there seems to properly finish, both on linux and macOS.

timgraham commented 6 years ago

Yes, this has been fixed.

mattip commented 6 years ago

Can we close this?

charris commented 6 years ago

Yes. The 1.14.3 release was also done with a 3.7 compatible Cython version.

eric-wieser commented 6 years ago

This still seems to be a problem in cython 0.28 and windows: #11483

250king commented 2 years ago

I have the same question, too. The environment: Python 3.9.2 Linux instance-3 5.10.0-12-cloud-amd64 #1 SMP Debian 5.10.103-1 (2022-03-07) x86_64 GNU/Linux

Building wheels for collected packages: PyWavelets
  Building wheel for PyWavelets (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_onh6alq
       cwd: /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/
  Complete output (220 lines):
  /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py:58: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/pywt
  copying pywt/_cwt.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_thresholding.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/version.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_multidim.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_functions.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_multilevel.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_swt.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_utils.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_doc_utils.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_c99_config.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/__init__.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_wavelet_packets.py -> build/lib.linux-x86_64-3.9/pywt
  copying pywt/_dwt.py -> build/lib.linux-x86_64-3.9/pywt
  creating build/lib.linux-x86_64-3.9/pywt/_extensions
  copying pywt/_extensions/__init__.py -> build/lib.linux-x86_64-3.9/pywt/_extensions
  creating build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/_wavelab_signals.py -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/_readers.py -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/__init__.py -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/create_dat.py -> build/lib.linux-x86_64-3.9/pywt/data
  creating build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_thresholding.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_perfect_reconstruction.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_cwt_wavelets.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_deprecations.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_wavelet.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_modes.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_wp2d.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_concurrent.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_functions.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test__pywt.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_matlab_compatibility.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_doc.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_multilevel.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_wp.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_dwt_idwt.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_multidim.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_matlab_compatibility_cwt.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_swt.py -> build/lib.linux-x86_64-3.9/pywt/tests
  copying pywt/tests/test_data.py -> build/lib.linux-x86_64-3.9/pywt/tests
  creating build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/tests/data/wavelab_test_signals.npz -> build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/tests/data/cwt_matlabR2015b_result.npz -> build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/tests/data/dwt_matlabR2012a_result.npz -> build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/tests/data/generate_matlab_data.py -> build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/tests/data/generate_matlab_data_cwt.py -> build/lib.linux-x86_64-3.9/pywt/tests/data
  copying pywt/data/ecg.npy -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/sst_nino3.npz -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/aero.npz -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/ascent.npz -> build/lib.linux-x86_64-3.9/pywt/data
  copying pywt/data/camera.npz -> build/lib.linux-x86_64-3.9/pywt/data
  running build_clib
  building 'c_wt' library
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/pywt
  creating build/temp.linux-x86_64-3.9/pywt/_extensions
  creating build/temp.linux-x86_64-3.9/pywt/_extensions/c
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -Ipywt/_extensions/c -I/usr/include/python3.9 -c pywt/_extensions/c/common.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/c/common.o
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -Ipywt/_extensions/c -I/usr/include/python3.9 -c pywt/_extensions/c/convolution.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/c/convolution.o
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -Ipywt/_extensions/c -I/usr/include/python3.9 -c pywt/_extensions/c/wt.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/c/wt.o
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -Ipywt/_extensions/c -I/usr/include/python3.9 -c pywt/_extensions/c/wavelets.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/c/wavelets.o
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -Ipywt/_extensions/c -I/usr/include/python3.9 -c pywt/_extensions/c/cwt.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/c/cwt.o
  x86_64-linux-gnu-gcc-ar rcs build/temp.linux-x86_64-3.9/libc_wt.a build/temp.linux-x86_64-3.9/pywt/_extensions/c/common.o build/temp.linux-x86_64-3.9/pywt/_extensions/c/convolution.o build/temp.linux-x86_64-3.9/pywt/_extensions/c/wt.o build/temp.linux-x86_64-3.9/pywt/_extensions/c/wavelets.o build/temp.linux-x86_64-3.9/pywt/_extensions/c/cwt.o
  running build_ext
  building 'pywt._extensions._pywt' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -DCYTHON_CCOMPLEX=1 -Ipywt/_extensions/c -I/usr/local/lib/python3.9/dist-packages/numpy/core/include -I/usr/include/python3.9 -c pywt/_extensions/_pywt.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/_pywt.o
  In file included from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                   from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from pywt/_extensions/_pywt.c:653:
  /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  pywt/_extensions/_pywt.c: In function ‘__Pyx_modinit_type_init_code’:
  pywt/_extensions/_pywt.c:34694:14: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34694 |   WaveletType.tp_print = 0;
        |              ^
  pywt/_extensions/_pywt.c:34702:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34702 |   ContinuousWaveletType.tp_print = 0;
        |                        ^
  pywt/_extensions/_pywt.c:34712:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34712 |   __pyx_type___pyx_array.tp_print = 0;
        |                         ^
  pywt/_extensions/_pywt.c:34717:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34717 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
        |                               ^
  pywt/_extensions/_pywt.c:34732:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34732 |   __pyx_type___pyx_memoryview.tp_print = 0;
        |                              ^
  pywt/_extensions/_pywt.c:34745:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  34745 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
        |                                   ^
  pywt/_extensions/_pywt.c: In function ‘__Pyx_ParseOptionalKeywords’:
  pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38752:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38752:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  pywt/_extensions/_pywt.c: In function ‘__Pyx_decode_c_string’:
  pywt/_extensions/_pywt.c:40513:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
  40513 |         return PyUnicode_FromUnicode(NULL, 0);
        |         ^~~~~~
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:97,
                   from pywt/_extensions/_pywt.c:62:
  /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
    551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
        |                                          ^~~~~~~~~~~~~~~~~~~~~
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for PyWavelets
  Running setup.py clean for PyWavelets
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149
  Complete output (11 lines):
  /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py:58: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

  `setup.py clean` is not supported, use one of the following instead:

    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)

  Add `--force` to your command to use it anyway if you must (unsupported).

  ----------------------------------------
  ERROR: Failed cleaning build dir for PyWavelets
Failed to build PyWavelets
Installing collected packages: PyWavelets, matplotlib, imagededup
  Attempting uninstall: PyWavelets
    Found existing installation: PyWavelets 1.3.0
    Uninstalling PyWavelets-1.3.0:
      Successfully uninstalled PyWavelets-1.3.0
    Running setup.py install for PyWavelets ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vw_fhfl_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/PyWavelets
         cwd: /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/
    Complete output (167 lines):
    /tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py:58: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install PyWavelets`   (last PyWavelets release on PyPI)

    running install
    running build
    running build_py
    copying pywt/version.py -> build/lib.linux-x86_64-3.9/pywt
    copying pywt/_c99_config.py -> build/lib.linux-x86_64-3.9/pywt
    running build_clib
    building 'c_wt' library
    running build_ext
    building 'pywt._extensions._pywt' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPY_EXTENSION -DHAVE_C99_COMPLEX -DCYTHON_CCOMPLEX=1 -Ipywt/_extensions/c -I/usr/local/lib/python3.9/dist-packages/numpy/core/include -I/usr/include/python3.9 -c pywt/_extensions/_pywt.c -o build/temp.linux-x86_64-3.9/pywt/_extensions/_pywt.o
    In file included from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                     from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pywt/_extensions/_pywt.c:653:
    /usr/local/lib/python3.9/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    pywt/_extensions/_pywt.c: In function ‘__Pyx_modinit_type_init_code’:
    pywt/_extensions/_pywt.c:34694:14: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34694 |   WaveletType.tp_print = 0;
          |              ^
    pywt/_extensions/_pywt.c:34702:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34702 |   ContinuousWaveletType.tp_print = 0;
          |                        ^
    pywt/_extensions/_pywt.c:34712:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34712 |   __pyx_type___pyx_array.tp_print = 0;
          |                         ^
    pywt/_extensions/_pywt.c:34717:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34717 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
          |                               ^
    pywt/_extensions/_pywt.c:34732:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34732 |   __pyx_type___pyx_memoryview.tp_print = 0;
          |                              ^
    pywt/_extensions/_pywt.c:34745:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
    34745 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
          |                                   ^
    pywt/_extensions/_pywt.c: In function ‘__Pyx_ParseOptionalKeywords’:
    pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38752:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38752:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38752:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38752 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                     ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c:38768:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    38768 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
          |                         ^
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    pywt/_extensions/_pywt.c: In function ‘__Pyx_decode_c_string’:
    pywt/_extensions/_pywt.c:40513:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
    40513 |         return PyUnicode_FromUnicode(NULL, 0);
          |         ^~~~~~
    In file included from /usr/include/python3.9/unicodeobject.h:1026,
                     from /usr/include/python3.9/Python.h:97,
                     from pywt/_extensions/_pywt.c:62:
    /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
      551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
          |                                          ^~~~~~~~~~~~~~~~~~~~~
    error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
    ----------------------------------------
  Rolling back uninstall of PyWavelets
  Moving to /usr/local/lib/python3.9/dist-packages/PyWavelets-1.3.0.dist-info/
   from /usr/local/lib/python3.9/dist-packages/~yWavelets-1.3.0.dist-info
  Moving to /usr/local/lib/python3.9/dist-packages/pywt/
   from /usr/local/lib/python3.9/dist-packages/~ywt
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jgd1c8xr/pywavelets_bf1467b26fa848989615013ddf8dc149/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vw_fhfl_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/PyWavelets Check the logs for full command output.