Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装报错:Failed to build autoawq==0.2.8 #7225

Open
1 task done
thinkingInWorldByNull opened this issue Mar 9, 2025 · 1 comment
Open
1 task done

安装报错:Failed to build autoawq==0.2.8 #7225

thinkingInWorldByNull opened this issue Mar 9, 2025 · 1 comment
Labels
bug Something isn't working pending This problem is yet to be addressed

Comments

@thinkingInWorldByNull
Copy link

thinkingInWorldByNull commented Mar 9, 2025

Reminder

  • I have read the above rules and searched the existing issues.

System Info

  • Mac M3
  • Python 3.10

问题描述

按照readme文档进行安装LLaMA-Factory出现报错。

报错信息

warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`.
  × Failed to build `autoawq==0.2.8`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "/Users/trytik/.cache/uv/builds-v0/.tmpJM1Hj7/lib/python3.10/site-packages/setuptools/build_meta.py", line 334, in
      get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/Users/trytik/.cache/uv/builds-v0/.tmpJM1Hj7/lib/python3.10/site-packages/setuptools/build_meta.py", line 304, in
      _get_build_requires
          self.run_setup()
        File "/Users/trytik/.cache/uv/builds-v0/.tmpJM1Hj7/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/Users/trytik/.cache/uv/builds-v0/.tmpJM1Hj7/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
      ModuleNotFoundError: No module named 'torch'

      hint: This error likely indicates that `[email protected]` depends on `torch`, but doesn't declare it as a build dependency. If `autoawq`
      is a first-party package, consider adding `torch` to its `build-system.requires`. Otherwise, `uv pip install torch` into the
      environment and re-run with `--no-build-isolation`.
  help: `autoawq` (v0.2.8) was included because `llamafactory[awq]` (v0.9.2.dev0) depends on `autoawq`

Reproduction

uv venv --python 3.10

source .venv/bin/activate

uv sync --extra torch --extra metrics --prerelease=allow

Others

尝试的解决方案:手动安装autoawq, uv pip install torch然后安装 uv pip install autoawq,出现报错

 × Failed to build `autoawq==0.2.8`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "/Users/trytik/.cache/uv/builds-v0/.tmpHvxSdu/lib/python3.10/site-packages/setuptools/build_meta.py", line 334, in
      get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/Users/trytik/.cache/uv/builds-v0/.tmpHvxSdu/lib/python3.10/site-packages/setuptools/build_meta.py", line 304, in
      _get_build_requires
          self.run_setup()
        File "/Users/trytik/.cache/uv/builds-v0/.tmpHvxSdu/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/Users/trytik/.cache/uv/builds-v0/.tmpHvxSdu/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
      ModuleNotFoundError: No module named 'torch'

      hint: This error likely indicates that `[email protected]` depends on `torch`, but doesn't declare it as a build dependency. If `autoawq`
      is a first-party package, consider adding `torch` to its `build-system.requires`. Otherwise, `uv pip install torch` into the
      environment and re-run with `--no-build-isolation`.
@thinkingInWorldByNull thinkingInWorldByNull added bug Something isn't working pending This problem is yet to be addressed labels Mar 9, 2025
@felipegaspari
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending This problem is yet to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants