nerfstudio搭建 win11踩坑记录之tinycudann

安装方法1

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
用上述语句安装,报错:
Failed to build tinycudann; Could not build wheels for tinycudann; Could not find filesystem; xxx.so.xx no such file or directory
Failed to build tinycudann; Could not build wheels for tinycudann; Could not find filesystem; xxx.so.xx no such file or directory

安装方法2

$ git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
$ cd tiny-cuda-nn
tiny-cuda-nn$ cmake . -B build
tiny-cuda-nn$ cmake --build build --config RelWithDebInfo -j
这里没安装cmake记得装一下
tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ python setup.py install

最后这句install的时候报错:

Can't install "tiny cuda nn" - host_config.h(231): fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

错误原因:

安装过程中检测不到visual studio中的配置.h文件

解决方法:

在虚拟环境nerfstudio下运行C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat文件

#此处路径根据自己的文件路径做调整
start C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat

之后弹出新的cmd

#方法一
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
#方法二
# 到tinycudann所在的位置重新执行install
tiny-cuda-nn/bindings/torch$ python setup.py install

安装成功!

测试:

python
import tinycudann

不报错,则安装成功!

参考

https://github.com/NVlabs/tiny-cuda-nn/issues/280
https://github.com/NVlabs/tiny-cuda-nn

  • 6
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值