InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Preparing metadata (pyproject.toml) did not run successfully

Open beber666 opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

macOS

GPU

cpu

VRAM

No response

What happened?

Hello

I've got a Mac Mini M1 2020 with MacOS 11.4 . First I had an issue with Pathlib, but Fixed it by using this trick https://github.com/invoke-ai/InvokeAI/issues/2166

I've tried to deploy InvokeAI
install.sh file at line 124 and change the python command to python3

Now the install is working, but at some moments it stops with this issue:

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
  ╰─> [74 lines of output]
      The Meson build system
      Version: 1.0.0
      Source dir: /private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846
      Build dir: /private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-ep9yacph/build
      Build type: native build
      Project name: SciPy
      Project version: 1.10.0
      C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.3)")
      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.3)")
      C++ linker for the host machine: c++ ld64 711
      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/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-ep9yacph/build/meson-logs/meson-log.txt
      + meson setup --prefix=/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10 /private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846 /private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-ep9yacph/build --native-file=/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
      Traceback (most recent call last):
        File "/Users/bertrand/invokeai/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'mesonpy' has no attribute 'prepare_metadata_for_build_wheel'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/bertrand/invokeai/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/Users/bertrand/invokeai/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/bertrand/invokeai/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 148, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 1060, in build_wheel
          with _project(config_settings) as project:
        File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
          return next(self.gen)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 975, in _project
          with Project.with_temp_working_dir(
        File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
          return next(self.gen)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 750, in with_temp_working_dir
          yield cls(source_dir, tmpdir, build_dir, meson_args)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 632, in __init__
          self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 680, in _configure
          self._meson('setup', *setup_args)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 657, in _meson
          return self._proc('meson', *args)
        File "/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-build-env-trie74z7/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 652, in _proc
          subprocess.check_call(list(args), env=self._env)
        File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['meson', 'setup', '--prefix=/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10', '/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846', '/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-ep9yacph/build', '--native-file=/private/var/folders/vz/hgcd9h8n7bgcqy3ljzx7gzsr0000gn/T/pip-install-w1c08la6/scipy_a64717a407f2433e93e113f819847846/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2']' returned non-zero exit status 1.
      [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.

Thank you for your help !

Here is also the Full log https://websolutis.com/bin/?a2c26690aee615b0#C62lRAuBs7LXYjsfXXfHnx9Hg5CnrjcAIkFp98O5pZw=

Screenshots

No response

Additional context

No response

Contact Details

No response

beber666 avatar Jan 10 '23 15:01 beber666

Fixed by upgrading to Ventura :-)

beber666 avatar Jan 11 '23 15:01 beber666

hi is there a solution to this? I'm also facing the same problem but I have no means to upgrade to Ventura

xnicolegracex avatar Jan 14 '23 22:01 xnicolegracex

The build log reports that SciPy, one of the dependencies, failed to build.

(Specifically, the error states that you do not have a Fortran compiler installed, and SciPy requires one to build from source.)

https://pypi.org/project/scipy/#files

SciPy has published wheels for arm64 macOS 12.0, and for x86_64 macOS 10.15, which does not cover your use case :( this is why pip attempted to build it from source instead.

eli-schwartz avatar Jan 16 '23 01:01 eli-schwartz

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 12 '23 06:03 github-actions[bot]

any solutions?

silencederek avatar Mar 15 '23 13:03 silencederek

Im also having this issue:/

ivankoros avatar Mar 24 '23 02:03 ivankoros

Im also having this issue:/

The same problem seems not to appear on Windows or Ubuntu. I just use Windows now... But I'm deploying Cellpose package, not InvokeAI as mentioned.

silencederek avatar Mar 24 '23 05:03 silencederek

I am still having this issue installing statsmodels on Windows through PyCharm (python3.8)... If anyone has solved please share the gospel.

Kraftdelfinen avatar Jun 02 '23 17:06 Kraftdelfinen

Quoting my comment from above:

The build log reports that SciPy, one of the dependencies, failed to build.

(Specifically, the error states that you do not have a Fortran compiler installed, and SciPy requires one to build from source.)

https://pypi.org/project/scipy/#files

Please check whether your current version of python has wheels available on PyPI for this dependency.

eli-schwartz avatar Jun 02 '23 18:06 eli-schwartz