AI软件下载
有趣网站推荐及实用软件下载

ModuleNotFoundError: No module named 'tinycudann'Windows电脑安装tinycudann模块详细教程

python应用安装报错,部分信息如下:

Traceback (most recent call last):
File “\models\utils.py”, line 10, in
import tinycudann as tcnn
ModuleNotFoundError: No module named ‘tinycudann’

报错信息为缺少tinycudann模块,安装上这个模块就可以了。我的是Windows系统电脑,CUDA为12.4,折腾过程:

看作者发布的PyTorch 扩展版安装方法为执行下面命令安装:

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

我试了下不行,会报错,错误信息有如下等内容

==================================================

File “\site-packages\torch\utils\cpp_extension.py”, line 2121, 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 tinycudann
Running setup.py clean for tinycudann
Failed to build tinycudann
Installing collected packages: tinycudann
Running setup.py install for tinycudann … error
error: subprocess-exited-with-error

× Running setup.py install for tinycudann did not run successfully.
│ exit code: 1
╰─> [216 lines of output]
Building PyTorch extension for tiny-cuda-nn version 1.7
Obtained compute capability 75 from PyTorch
Detected CUDA version 12.4
Targeting C++ standard 17
running install
site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include\crt/host_config.h(248): fatal error C1083: 无法打开包括文件: “crtdefs.h”: No such file or directory

  object.cu

  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "site-packages\torch\utils\cpp_extension.py", line 2105, in _run_ninja_build
      subprocess.run(
    File "\subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

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

==================================================

继续折腾,网上搜索了一下,看到如下一个解决方案,

先执行下面命令,打开一个新窗口

#此处路径根据自己的文件路径做调整
start "E:\Microsoft\2022\VC\Auxiliary\Build\vcvars64.bat"

在新的vcvars64.bat窗口中执行安装命令:

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

如果你安装成功了的话,那么恭喜你,很幸运,如果你像我一样还是报错的话,可按照下面的方式处理,

点击【开始】找到visual studio 点击启动【x64 Native Tools Command Prompt…】

然后在终端里运行安装命令:

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

OK,终于成功安装tinycudann,太痛苦了,给遇到相同问题的伙伴一点解决思路。

tinycudann项目地址:https://github.com/NVlabs/tiny-cuda-nn

领即梦AI免费积分,开启AI创作之旅:速领>>

软件催更及1对1人工答疑支持: https://nuowa.net/1806
赞(0) 打赏
软件无法使用?点击查看常见问题说明>>

最近更新

凡人修仙传动画韩立高清图片壁纸素材AI绘画图集-诺瓦小站

凡人修仙传动画韩立高清图片壁纸素材AI绘画图集

恭迎韩天尊! 祝贺韩天尊顺利结婴! 热门国漫凡人修仙传动画已经更新了5年了,最新一集,主人公韩立顺利结婴,成为一名元婴修士。我属于是比较喜欢看动漫的,看过的动漫估计没过百也得大几十了,热门国漫大多都看过。凡人修仙传算是最喜欢的动漫之一,韩立...

凡人修仙传动画慕沛灵高清壁纸图片,单人AI图片素材-诺瓦小站

凡人修仙传动画慕沛灵高清壁纸图片,单人AI图片素材

最近需要用到凡人修仙传动画里人物图片,直接在视频里截图的话要么身体姿势不对要么就身体不完整等,截不到想要的图,然后就炼了一批AI图,这次分享的这些都是慕沛灵的单人图片,全身照,都是高清的,由于只需要竖屏,所以我没生成横屏图片。喜欢的可以拿去...

免费在线视频去水印工具方法-诺瓦小站

免费在线视频去水印工具方法

本次分享一个免费的在线视频去水印工具–记灵 这个在线工具目前是完全免费的,上传mp4视频文件,然后鼠标框选去水印区域,然后点击处理等待处理完成就可以了,操作非常简单。 这个去水印工具是采用打码的方式覆盖原水印区域的,并不是AI智...

觉得文章对你有帮助就打赏一下作者

非常感谢你的打赏,我将有更多的动力继续提供优质内容,让我们一起创建更加美好的世界!

支付宝扫一扫

微信扫一扫