cokelaer / spectrum

Spectral Analysis in Python
http://pyspectrum.readthedocs.io
BSD 3-Clause "New" or "Revised" License
339 stars 90 forks source link

ERROR: Failed building wheel for spectrum #83

Open JohnAtl opened 8 months ago

JohnAtl commented 8 months ago

1. Describe the bug Trying to install spectrum using pip install spectrum.

The following diagnostics are printed after listing satisfied dependencies, etc.

Building wheels for collected packages: spectrum
  Building wheel for spectrum (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [102 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cpp
      copying src/cpp/__init__.py -> build/lib.linux-x86_64-cpython-311/cpp
      creating build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/__init__.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/arma.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/burg.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/cholesky.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/correlation.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/correlog.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/covar.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/criteria.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/datasets.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/eigen.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/eigenfre.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/errors.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/io.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/levinson.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/linalg.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/linear_prediction.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/lpc.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/minvar.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/modcovar.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/mtm.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/periodogram.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/psd.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/spectrogram.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/toeplitz.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/tools.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/transfer.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/waveform.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/window.py -> build/lib.linux-x86_64-cpython-311/spectrum
      copying src/spectrum/yulewalker.py -> build/lib.linux-x86_64-cpython-311/spectrum
      creating build/lib.linux-x86_64-cpython-311/spectrum/data
      copying src/spectrum/data/__init__.py -> build/lib.linux-x86_64-cpython-311/spectrum/data
      copying src/spectrum/data/DOLPHINS.wav -> build/lib.linux-x86_64-cpython-311/spectrum/data
      copying src/spectrum/data/sunspot.dat -> build/lib.linux-x86_64-cpython-311/spectrum/data
      copying src/spectrum/data/sunspot_monthly.dat -> build/lib.linux-x86_64-cpython-311/spectrum/data
      running build_ext
      building 'spectrum.mydpss' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/cpp
      gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/home/john/work/Sleep/.venv/include -I/usr/include/python3.11 -c src/cpp/mydpss.c -o build/temp.linux-x86_64-cpython-311/src/cpp/mydpss.o
      gcc -shared -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto build/temp.linux-x86_64-cpython-311/src/cpp/mydpss.o -L/usr/lib -o build/lib.linux-x86_64-cpython-311/spectrum/mydpss.cpython-311-x86_64-linux-gnu.so
      /home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      installing to build/bdist.linux-x86_64/wheel
      running install
      running install_lib
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-m0hefuy1/spectrum_6a6864a0840744948dcafcee08223808/setup.py", line 19, in <module>
          setup(
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 404, in run
          self.run_command("install")
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 709, in run
          self.run_command(cmd_name)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
          self.set_undefined_options('install',('install_layout','install_layout'))
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options
          setattr(self, dst_option, getattr(src_cmd_obj, src_option))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/john/work/Sleep/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: install_layout. Did you mean: 'install_platlib'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for spectrum
  Running setup.py clean for spectrum
Failed to build spectrum
ERROR: Could not build wheels for spectrum, which is required to install pyproject.toml-based projects

2. To Reproduce (EndeavourOS is basically Arch) OS: EndeavourOS Linux x86_64 Kernel: 6.6.21-1-lts Uptime: 4 days, 17 hours, 5 mins Packages: 1022 (pacman), 34 (flatpak) Shell: zsh 5.9 Resolution: 3840x2160, 2560x2880, 3840x2160 DE: GNOME 45.4 WM: Mutter WM Theme: Adwaita Theme: Adwaita [GTK2/3] Icons: Qogir [GTK2/3] Terminal: kitty CPU: 13th Gen Intel i9-13900K (32) @ 5.500GHz GPU: NVIDIA RTX A4500 GPU: Intel DG2 [Arc A380] Memory: 12799MiB / 128507MiB

at 16:03:30 > python --version Python 3.11.8

at 16:04:05 > gcc --version gcc (GCC) 13.2.1 20230801

at 15:56:04 x pip install spectrum Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Collecting spectrum Downloading spectrum-0.8.1.tar.gz (230 kB)

JohnAtl commented 8 months ago

Looks like Python 3.12.2 fixed the issue. Thanks!