[GH-ISSUE #631] ERROR: Failed to build installable wheels for some pyproject.toml based projects (ktransformers) #467

Open
opened 2026-10-29 14:40:07 +00:00 by bsakaguchi · 11 comments
Owner

Originally created by @a812305914 on GitHub (Feb 24, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/631

【软件环境】
cuda 12.2
python3.11
gcc 11.4.0
cmake 3.16.3
【硬件环境】
A100 * 8

运行bash install.sh 出现如下报错

ling NUMA support\n-- Configuring done\n-- Generating done\n-- Build files have been written to: /opt/ktransformers/ktransformers/ktransformers_ext/build\n'
      Standard error: b'CMake Warning:\n  Manually-specified variables were not used by the project:\n\n    EXAMPLE_VERSION_INFO\n\n\n'
      Traceback (most recent call last):
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 438, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 426, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
          self.run_setup()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 372, in <module>
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands
          self.run_command(cmd)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
        File "<string>", line 177, in run
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 379, in run
          self.run_command("build")
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
          self.distribution.run_command(command)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 136, in run
          self.run_command(cmd_name)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
          self.distribution.run_command(command)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 99, in run
          _build_ext.run(self)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 365, in run
          self.build_extensions()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 900, in build_extensions
          build_ext.build_extensions(self)
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 481, in build_extensions
          self._build_extensions_serial()
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 507, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 327, in build_extension
        File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--verbose', '--parallel=64']' 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: Failed building wheel for ktransformers
Failed to build ktransformers
ERROR: Failed to build installable wheels for some pyproject.toml based projects (ktransformers)

Originally created by @a812305914 on GitHub (Feb 24, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/631 【软件环境】 cuda 12.2 python3.11 gcc 11.4.0 cmake 3.16.3 【硬件环境】 A100 * 8 运行bash install.sh 出现如下报错 ``` ling NUMA support\n-- Configuring done\n-- Generating done\n-- Build files have been written to: /opt/ktransformers/ktransformers/ktransformers_ext/build\n' Standard error: b'CMake Warning:\n Manually-specified variables were not used by the project:\n\n EXAMPLE_VERSION_INFO\n\n\n' Traceback (most recent call last): File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel return _build_backend().build_wheel( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 438, in build_wheel return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 426, in _build return self._build_with_temp_dir( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir self.run_setup() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup exec(code, locals()) File "<string>", line 372, in <module> File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands self.run_command(cmd) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command super().run_command(command) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command cmd_obj.run() File "<string>", line 177, in run File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 379, in run self.run_command("build") File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command self.distribution.run_command(command) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command super().run_command(command) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command cmd_obj.run() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 136, in run self.run_command(cmd_name) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command self.distribution.run_command(command) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/dist.py", line 999, in run_command super().run_command(command) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command cmd_obj.run() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 99, in run _build_ext.run(self) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 365, in run self.build_extensions() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 900, in build_extensions build_ext.build_extensions(self) File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 481, in build_extensions self._build_extensions_serial() File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 507, in _build_extensions_serial self.build_extension(ext) File "<string>", line 327, in build_extension File "/opt/module/anaconda3/envs/ktransformers/lib/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--verbose', '--parallel=64']' 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: Failed building wheel for ktransformers Failed to build ktransformers ERROR: Failed to build installable wheels for some pyproject.toml based projects (ktransformers) ```
Author
Owner

@ZZF0 commented on GitHub (Feb 24, 2025):

Hello, I'm encountering the same issue. My operating system is Ubuntu 20.04.

<!-- gh-comment-id:2677634651 --> @ZZF0 commented on GitHub (Feb 24, 2025): Hello, I'm encountering the same issue. My operating system is Ubuntu 20.04.
Author
Owner

@foreverwith commented on GitHub (Feb 24, 2025):

Same am I

<!-- gh-comment-id:2677982188 --> @foreverwith commented on GitHub (Feb 24, 2025): Same am I
Author
Owner

@loki1017 commented on GitHub (Feb 24, 2025):

俺也一样

<!-- gh-comment-id:2678353762 --> @loki1017 commented on GitHub (Feb 24, 2025): 俺也一样
Author
Owner

@huadaniu commented on GitHub (Feb 24, 2025):

俺也一样

<!-- gh-comment-id:2678380017 --> @huadaniu commented on GitHub (Feb 24, 2025): 俺也一样
Author
Owner

@ubergarm commented on GitHub (Feb 24, 2025):

各位开发者,欢迎点击此处查看关于构建或使用ktransformers预编译whl包的指南。

初步判断,您可能缺少某些构建环境依赖项。

若需更多帮助,建议搜索现有议题(open threads)中提到的类似问题。

祝顺利,数据单元(tokens)正待诸君耐心挖掘!


Hey everyone I welcome you to check out this guide on building or using precompiled whl package for ktransformers here.

At first glance it looks like you are possibly missing some build environment dependencies.

Also there are some existing issues that you might like to search for more help.

Good luck, the tokens are waiting for you to patiently unearth them!

<!-- gh-comment-id:2679310425 --> @ubergarm commented on GitHub (Feb 24, 2025): **各位开发者**,欢迎[点击此处查看关于构建或使用ktransformers预编译whl包的指南](https://github.com/ubergarm/r1-ktransformers-guide/blob/main/README.zh.md)。 初步判断,您可能缺少某些构建环境依赖项。 若需更多帮助,建议搜索现有议题(open threads)中提到的类似问题。 祝顺利,数据单元(tokens)正待诸君耐心挖掘! --- Hey everyone I welcome you to [check out this guide on building or using precompiled whl package for ktransformers here](https://github.com/ubergarm/r1-ktransformers-guide/blob/main/README.zh.md). At first glance it looks like you are possibly missing some build environment dependencies. Also there are some existing issues that you might like to search for more help. Good luck, the tokens are waiting for you to patiently unearth them!
Author
Owner

@EchoofEther commented on GitHub (Mar 7, 2025):

解决了吗

<!-- gh-comment-id:2705743186 --> @EchoofEther commented on GitHub (Mar 7, 2025): 解决了吗
Author
Owner

@a812305914 commented on GitHub (Mar 7, 2025):

解决了吗

使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了

<!-- gh-comment-id:2705747168 --> @a812305914 commented on GitHub (Mar 7, 2025): > 解决了吗 使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了
Author
Owner

@EchoofEther commented on GitHub (Mar 7, 2025):

解决了吗

使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了
请问docker镜像在哪下啊

<!-- gh-comment-id:2705760956 --> @EchoofEther commented on GitHub (Mar 7, 2025): > > 解决了吗 > > 使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了 请问docker镜像在哪下啊
Author
Owner

@a812305914 commented on GitHub (Mar 7, 2025):

解决了吗

使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了
请问docker镜像在哪下啊

https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Docker.md

<!-- gh-comment-id:2705762916 --> @a812305914 commented on GitHub (Mar 7, 2025): > > > 解决了吗 > > > > > > 使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了 > > 请问docker镜像在哪下啊 https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Docker.md
Author
Owner

@EchoofEther commented on GitHub (Mar 7, 2025):

解决了吗

使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了
请问docker镜像在哪下啊

https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Docker.md

十分感谢!我去试试

<!-- gh-comment-id:2705766539 --> @EchoofEther commented on GitHub (Mar 7, 2025): > > > > 解决了吗 > > > > > > > > > 使用官方的docker镜像,然后在docker镜像内重新编译安装项目,就可以运行了 > > > 请问docker镜像在哪下啊 > > https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Docker.md 十分感谢!我去试试
Author
Owner

@lbmshuai commented on GitHub (Mar 16, 2025):

解决了吗

我的问题是bios里没关安全启动,导致不认nv驱动。关掉安全启动后成功安装。

<!-- gh-comment-id:2727248364 --> @lbmshuai commented on GitHub (Mar 16, 2025): > 解决了吗 我的问题是bios里没关安全启动,导致不认nv驱动。关掉安全启动后成功安装。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#467
No description provided.