Skip to content

[Bug]python312 benchmark编译报错缺少pkg_resources,但已安装setuptools #488

Closed

Description

@sy090502

操作系统及版本

Ubuntu 22.04

安装工具的python环境

docker容器中的python环境

python版本

其他

AISBench工具版本

无

AISBench执行命令

还未执行到此步骤

模型配置文件或自定义配置文件内容

无

预期行为

编译成功

实际行为

执行python -m venv benchmark_venv
source $workspace/benchmark_venv/bin/activate
cd $workspace/benchmark
pip3 install -e ./ --use-pep517
pip3 install -r requirements/api.txt
pip3 install -r requirements/extra.txt
报错 No module named 'pkg_resources'
Collecting pandas<2.0.0 (from ais_bench_benchmark==3.0.20251103)
Downloading https://mirrors.tools.huawei.com/pypi/packages/74/ee/146cab1ff6d575b54ace8a6a5994048380dc94879b0125b25e62edcb9e52/pandas-1.5.3.tar.gz (5.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 24.6 MB/s eta 0:00:00
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
main()
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 175, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/setuptools/build_meta.py", line 380, in prepare_metadata_for_build_wheel
self.run_setup()
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/setuptools/build_meta.py", line 520, in run_setup
super().run_setup(setup_script=setup_script)
File "/autotest/pytorch/torch_autotest/model/run/Roll_Qwen3_30b_fsdp/acc_bf16/ROLL/roll/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals()) # noqa: S102 # exec is intentional here
^^^^^^^^^^^^^^^^^^^^
File "", line 19, in
ModuleNotFoundError: No module named 'pkg_resources'
[end of output]

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

[notice] A new release of pip is available: 25.0.1 -> 26.2.1
[notice] To update, run: pip install --upgrade pip
error: metadata-generation-failed

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

前置检查

  • 我已读懂主页文档的快速入门,无法解决问题
  • 我已检索过FAQ,无重复问题
  • 我已搜索过现有Issue,无重复问题
  • 我已更新到最新版本,问题仍存在

Activity

  1. added
    bug
    on Aug 25, 2026
  2. github-actions commented on Aug 25, 2026

    @github-actions

    🌟欢迎给AISBench benchmark测评工具提issue,您可以先尝试以下途径寻求issue的解决方法:

    1. 【强烈推荐❤️‍🔥】确保issue描述完整后,可以试着将issue交给Ask DeepWiki回答,deepwiki包含了和工具相关的所有知识库
    2. 在 工具历史issue 中通过问题的关键日志片段或关键词检索相似issue
    3. 在 官方文档 的搜索栏中通过问题的关键日志片段或关键词检索
    4. 寻求仓库维护者的帮助(issue评论区中 @SJTUyh)
  3. github-actions commented on Aug 25, 2026

    @github-actions

    🤖 基于AI机器人的issue内容完整性检查结果:

    问题内容检查结果

    检查状态

    PASS

    详细检查

    • 操作系统及版本: COMPLETE
    • 安装工具的python环境: COMPLETE
    • python版本: COMPLETE
    • AISBench工具版本: COMPLETE
    • AISBench执行命令: COMPLETE
    • 模型配置文件或自定义配置文件内容: COMPLETE
    • 实际行为: COMPLETE

    改进建议

    • python版本: 当前填写为“其他”,虽然根据标题和实际行为中的报错信息可以推断是 Python 3.12,但建议直接填写具体的版本号(例如“Python 3.12”)会更清晰。

    补充说明

    所有必填内容均已提供,且信息完整、相关。实际行为部分提供了详细的报错日志,非常有帮助。

    👉 如果想重新检查,在评论区@issue_checker即可。

    【强烈推荐❤️‍🔥】确保issue描述完整后,可以试着将issue交给Ask DeepWiki回答,deepwiki包含了和工具相关的所有知识库

  4. added
    content_check_passed
    on Aug 25, 2026
  5. sy090502 commented on Aug 25, 2026

    @sy090502
    Author

    @SJTUyh你好,可以麻烦尽快看一下这个问题吗?测试任务需要使用,被阻塞了

  6. zhongzhouTan-coder commented on Sep 20, 2026

    @zhongzhouTan-coder
    Contributor

    setuptools 82.0.0 版本移除了 pkg_resource,需要安装 setuptools <= 80.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcontent_check_passed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions