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…】

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

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

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
ModuleNotFoundError: No module named 'tinycudann'Windows电脑安装tinycudann模块详细教程

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

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


AI软件用不了?2元爽玩4090: 立即体验>>

热门大语言模型API免费体验: 立即获取>>

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

最近更新

Claude 再放大招,Sonnet 5 来了-诺瓦小站

Claude 再放大招,Sonnet 5 来了

一觉醒来Anthropic又放大招了,Claude Sonnet 5来了。 不得不说国外大语言模型更新的是真快的,各家LLM版本更新迭代频率都很高,Claude 刚发布Opus 4.8 不久,这又发布了Sonnet 5.Anthropic ...

祝贺凡人修仙传2026年新年番开播同时在线人数超64万-诺瓦小站

祝贺凡人修仙传2026年新年番开播同时在线人数超64万

今天6月13日凡人修仙传新年番开播,同时在线人数破64万(非最高在线人数,只是我看到的在线人数),作为凡人5年老粉,必须发个帖祝贺一下。 我比较喜欢看动漫,各种类型看了很多,具体不清楚多少,像斗罗斗破之类看了一大半终究是没能看下去,还是雾山...

Claude居然自称“本人”-诺瓦小站

Claude居然自称“本人”

今天在和Claude聊网文写作的时候,Claude回复中居然自称本人,这让我有点震惊。 我经常会和AI聊工具功能对比等话题,ChatGPT、Gemini、Claude这些以前我记得从来没有自称过本人的,好像都是本模型,本工具等等,反正从来没...

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

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

支付宝扫一扫

微信扫一扫