ERROR: Could not build wheels for xxx which is required to install pyproject.toml-based projects

		File "/home/wenniu/anaconda3/envs/nero/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/wenniu/anaconda3/envs/nero/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2116, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for raytracing
  Running setup.py clean for raytracing
Failed to build raytracing
ERROR: Could not build wheels for raytracing, which is required to install pyproject.toml-based projects

这个问题是由于cuda版本、nvcc版本、Pytorch版本不一致所导致的。
我的解决方法是:
conda create -n py31013torch1131cu117 python=3.10.13
其中,python版本是3.10.13
torch的版本是1.13.1cu117
CUDA版本是11.7(及以上,事实上是12.2)
nvcc版本是11.7
torch安装: conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
nvcc安装:

wget https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run                                                             
sudo sh cuda_11.7.1_515.65.01_linux.run

最后在.bashrc或者.zshrc里面加入nvcc11.7的路径

===========
= Summary =
===========

Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-11.7/

Please make sure that
 -   PATH includes /usr/local/cuda-11.7/bin
 -   LD_LIBRARY_PATH includes /usr/local/cuda-11.7/lib64, or, add /usr/local/cuda-11.7/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.7/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 515.00 is required for CUDA 11.7 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
    sudo <CudaInstaller>.run --silent --driver

Logfile is /var/log/cuda-installer.log
PATH=/usr/local/cuda-11.7/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64:$LD_LIBRARY_PATH
  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
引用:报错内容: ERROR: Could not build wheels for pynacl, which is required to install pyproject.toml-based projects。引用:其他安装包类似的报错也可以用同样的方式解决 ERROR: Could not build wheels for XXX, which is required to install pyproject.toml-based projects。引用:lanms_neo-1.0.2-cp38-cp38-win_amd64.whl 免编译直装版 error: Microsoft Visual C 14.0 or greater ...ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects。 这个错误提示意味着在安装jpype1时无法构建wheels,而pyproject.toml-based项目需要jpype1来完成安装。与这个问题类似的报错消息也可以用同样的方法来解决。例如,当报错内容提示无法构建pynacl的wheels时,可以采取类似的解决方式。 解决此问题的方法是确保你的环境中安装了所需的构建工具和依赖项。具体来说,在这种情况下,可能需要安装Microsoft Visual C++ 14.0或更高版本的构建工具。这是因为jpype1可能需要使用这些工具来构建wheels并完成安装。你可以从Microsoft官方网站下载和安装适合你系统的Visual C++ Build Tools或Visual Studio。 另外,还可以尝试使用预编译的wheels版本进行安装。例如,你可以寻找一个名为"lanms_neo-1.0.2-cp38-cp38-win_amd64.whl"的免编译直装版,并尝试使用这个wheels来安装lanms-neo。同样地,你可以尝试寻找一个名为jpype1的免编译直装版wheels,并尝试使用这个wheels来解决报错问题。这些预编译的wheels版本通常可以避免构建过程中的错误。 总结起来,解决ERROR: Could not build wheels for jpype1的问题的方法包括: 1. 确保安装了所需的构建工具和依赖项,如Microsoft Visual C++ 14.0或更高版本的构建工具。 2. 尝试使用预编译的wheels版本进行安装,以避免构建过程中的错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [ERROR: Could not build wheels for XXX, which is required to install pyproject.toml-based projects](https://blog.csdn.net/longe20111104/article/details/131332169)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [lanms-neo-1.0.2-cp38-cp38-win-amd64.whl](https://download.csdn.net/download/sayonekui/87429886)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ProfSnail

谢谢老哥嗷

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值