zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://privategpt.dev
Apache License 2.0
53.46k stars 7.18k forks source link

Preparing metadata (pyproject.toml) did not run successfully. #942

Closed satishBohra closed 6 months ago

satishBohra commented 1 year ago

Note: if you'd like to ask a question or open a discussion, head over to the Discussions section and post it there. Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [86 lines of output] Traceback (most recent call last): File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 81, in getattr return next( ^^^^^ File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 82, in ast.literal_eval(value) File "C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 110, in literal_eval return _convert(node_or_string) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 109, in _convert return _convert_signed_num(node) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 83, in _convert_signed_num return _convert_num(node) ^^^^^^^^^^^^^^^^^^ File "C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 74, in _convert_num _raise_malformed_node(node) File "C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\ast.py", line 71, in _raise_malformed_node raise ValueError(msg + f': {node!r}') ValueError: malformed node or string on line 2: <ast.Call object at 0x0000025683AD1330>

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 191, in read_attr
      return getattr(StaticModule(module_name, spec), attr_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 87, in __getattr__
      raise AttributeError(f"{self.name} has no attribute {attr}") from e
  AttributeError: wrapt has no attribute __version__

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "D:\AI\privateGPT\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\AI\privateGPT\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\AI\privateGPT\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\build_meta.py", line 380, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup
      self).run_setup(setup_script=setup_script)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 41, in <module>
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 159, in setup
      dist.parse_config_files()
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\dist.py", line 894, in parse_config_files
      setupcfg.parse_configuration(
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 189, in parse_configuration
      meta.parse()
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 500, in parse
      section_parser_method(section_options)
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 475, in parse_section
      self[name] = value
      ~~~~^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 293, in __setitem__
      parsed = self.parsers.get(option_name, lambda x: x)(value)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 606, in _parse_version
      return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 417, in _parse_attr
      return expand.read_attr(attr_desc, package_dir, root_dir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 194, in read_attr
      module = _load_spec(spec, module_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Satish\AppData\Local\Temp\pip-build-env-om9hg96c\overlay\Lib\site-packages\setuptools\config\expand.py", line 214, in _load_spec
      spec.loader.exec_module(module)  # type: ignore
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap_external>", line 940, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "C:\Users\Satish\AppData\Local\Temp\pip-install-ylbme06r\wrapt_dff331c8503648abaaedba4896fd2642\src\wrapt\__init__.py", line 10, in <module>
      from .decorators import (adapter_factory, AdapterFactory, decorator,
    File "C:\Users\Satish\AppData\Local\Temp\pip-install-ylbme06r\wrapt_dff331c8503648abaaedba4896fd2642\src\wrapt\decorators.py", line 34, in <module>
      from inspect import ismethod, isclass, formatargspec
  ImportError: cannot import name 'formatargspec' from 'inspect' (C:\Users\Satish\AppData\Local\Programs\Python\Python311\Lib\inspect.py)
  [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. Describe the bug and how to reproduce it A clear and concise description of what the bug is and the steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

gadams999 commented 1 year ago

Also seen on macOS using Python 3.11.4.

Using Python 3.10.12, pip install -r requirements.txt completed correctly from main branch.

Edit: Tested with Python 3.10.

bhavik-goplani commented 1 year ago

Faced the same bug but installed dependencies one by one, which works.

frikishaan commented 1 year ago

It works form me on Python version 3.10.11. Also, I have to install C++ compiler, check out the system requirements section.

TristynAlxander commented 1 year ago

I fixed a similar issue by using Python version 3.10.10 on linux-mint. I think it's a wrapt issue caused by python 3.11 deprecations. I didn't try versions other than 3.10.10, but given the other comments I suspect anything less than 3.11 would work. After downloading the LLM and editing the env to add its (absolute) path, I also had to use pip install sentence_transformers for langchain.

Now I have it working.

vivek5130 commented 1 year ago

same issue with me using python version 3.113 on windows 10 os.

Johnny-Connor commented 1 year ago

Same issue, solutions listed here did not work.

rahulkjain commented 1 year ago

faced the same with Python 3.11.4. Worked fine with 3.10 and installing C++ Universal Windows Platform Support

admin0987iu commented 11 months ago

I think i handle some of the error that i have try follow these steps

0.pip cache purge
😏pip install meson 1.python -m pip install --upgrade pip 😎pip install importlib-metadata 2.python -m pip install --upgrade setuptools 😇pip install subprocess.run 3.pip3 install wheel setuptools pip --upgrade 🤨pip install toml 4.pip install numpy --use-deprecated=legacy-resolver 🤨pip install setuptools-metadata

Hamaddah commented 11 months ago

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

problem still exists

AlbertZhabaliev commented 10 months ago

Downgrading to Python 3.10.x solved the issue for me. Hope it helps.

MatheusPerpetua commented 10 months ago

Same problem here

xueqings commented 10 months ago

you can try python 3.8, I solve the problem successfully.

Jawad-Khalil commented 8 months ago

The same type of error occurred for me during the installation of the scipy package on Python 3.9.13 Try to install nearly below or above version of scipy with the Python version release date. For example, if you have Python 3.9.13 (release date: May 17, 2022) (as in my case), try to install the scipy package version 1.8.1 (release date: May 18, 2022). I don't know whether it will work for you in your case but it worked for me to install more than 2 packages with the same issue. Python 3.9.13 Pillow 9.5.0 scipy 1.8.1 matplotlib 3.7.1 meta data generation faild

originalsaizo commented 8 months ago

I also get the same type of error. However, I'm on a RaspberryPi 4, and running Python 3.11.2. What I'm trying to install (for Thonny), is QCustomPlot_PyQt5. I tested even QCustomPlot_PyQt6, still get the same issue.

Further research, on my system, I could see that some packages/software was not completely installed.

If someone else has same version of Python (3.11.2), and is running Bookworm, let me know if you solved it, and which steps to take.

kickoffpro commented 7 months ago

for me too in my MacAir Big Sur, every install using brew if its needed python-hatchling, this errors will in some way.

Captura de Tela 2024-01-16 às 14 49 59

Karthikeyakucham6918 commented 5 months ago

How can i resolve this error in windows 11 -Python 3.12.2

Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [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.

MikePendo commented 5 months ago

I installed Cargo from here: https://rustup.rs and added to the path

Harishprabhu30 commented 2 months ago

Yes! DOWNGRADING THE PYTHON VERSION FROM 3.11 TO 3.10 SOLVES THE ERROR.

Priyasdvh commented 1 month ago

Could be resolved if you install required pip one by one

Hypes-Astro commented 4 weeks ago

pip install matplotlib==3.8.4

it works

Hypes-Astro commented 4 weeks ago

Same problem here

pip install matplotlib==3.8.4 it works. i got python 3.11

image

image

tbiber2 commented 4 weeks ago

pip install matplotlib==3.8.4 worked for me, too.

Carlolopespesia commented 4 weeks ago

pip install matplotlib==3.8.4

it works

It works! Thank you a lot!!!

Vikisss commented 2 weeks ago

same problem

jodomaq commented 1 week ago

You are not writing the package correctly