本文主要是介绍【爬坑】torch_scatter安装踩坑实录及解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题
UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。warnings.warn(f'Error checking compiler version for {compiler}: {error}')building 'torch_scatter._scatter_cpu' extensionerror: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for torch-scatterRunning setup.py clean for torch-scatter
Failed to build torch-scatter
ERROR: Could not build wheels for torch-scatter, which is required to install pyproject.toml-based projects
解决方法
试了其他很多种方法都不行 /(ㄒoㄒ)/~~
还是老老实实下载了生成工具。
刚开始只勾了这个,一直报错
fatal error C1083: 无法打开包括文件: “assert.h”: No such file or directoryerror: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2[end of output]
然后重新把“使用c++的桌面开发”也勾选上
成功啦❗❗❗❗
o( ̄▽ ̄)ブ
Successfully built torch-scatter
Installing collected packages: torch-scatter
Successfully installed torch-scatter-2.1.2
这篇关于【爬坑】torch_scatter安装踩坑实录及解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!