spotify/basic-pitch

error: metadata-generation-failed

jonch070 opened this issue · 2 comments

Hello,

I'm a bit of a noob but having this issue on an M1 mac:

jonathankawchuk@Jonathans-M1-MacBook-Pro ~ % python3.9 -m pip install basic-pitch
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at Homebrew/homebrew-core#76621
Collecting basic-pitch
Using cached basic_pitch-0.2.3-py2.py3-none-any.whl (373 kB)
Requirement already satisfied: numpy<1.24,>=1.18 in /opt/homebrew/lib/python3.9/site-packages (from basic-pitch) (1.22.3)
Collecting librosa>=0.8.0
Using cached librosa-0.10.0.post2-py3-none-any.whl (253 kB)
Collecting typing-extensions
Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting pretty-midi>=0.2.9
Using cached pretty_midi-0.2.10.tar.gz (5.6 MB)
Preparing metadata (setup.py) ... done
Collecting resampy>=0.2.2
Using cached resampy-0.4.2-py3-none-any.whl (3.1 MB)
Collecting scipy>=1.4.1
Using cached scipy-1.10.1.tar.gz (42.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
The Meson build system
Version: 1.0.1
Source dir: /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f
Build dir: /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build
Build type: native build
Project name: SciPy
Project version: 1.10.1
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C++ linker for the host machine: c++ ld64 711
Cython compiler for the host machine: cython (cython 0.29.33)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
Library m found: YES

  ../../meson.build:63:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
  The following exception(s) were encountered:
  Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
  Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
  Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
  Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
  
  A full log can be found at /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build/meson-logs/meson-log.txt
  + meson setup --prefix=/opt/homebrew/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9 /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build --native-file=/private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python3.9 -m pip install --upgrade pip

hello,i alse meet this problem,can you tell me how to solve it?

If you can share your logs from running pip, I can help. From the logs above it looks like scipy failed to install due to a lack of fortran compilers on the user's machine. You can see this from the line ../../meson.build:63:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]. So if you have the same issue, you'll have to install some fortran compiler, e.g.,brew install gcc