在运行PS-Nerf开源代码时,遇到如下错误:
RuntimeError: No such operator torch_cluster::fps_ptr_list
查阅相关资料,是torch_cluster的版本与环境中torch cuda的版本不匹配。
当初配置环境时,简单地通过下述指令进行安装,没有考察版本的匹配问题。
pip install torch_cluster # 错误,不确定版本是否匹配
实际上,在安装好torch cuda并明确其对应的版本后,通过链接可以找到对应的torch_cluster的whl文件。
笔者配置的环境为:py3.9 + torch1.8.0 + cu11.1.1
通过上述链接,找到:
单击进去,进而找到适配py3.9所对应的Linux下文件
通过下述指令安装即可:
pip install *.whl
安装成功后,再导入torch_cluster,成功!_scatter _sparse可以采用同样方式。