当前位置:   article > 正文

torch_scatter安装踩坑实录_torch-scatter

torch-scatter

由于运行代码出现如下报错

ModuleNotFoundError: No module named 'torch_scatter'
  • 1

因此,在网上找到一篇博客【不好使】

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.12.1+cu116.html
  • 1
(match) F:\matchCode\SuperGlue_training-main>pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.12.1+cu116.html
Looking in links: https://pytorch-geometric.com/whl/torch-1.12.1+cu116.html
Collecting torch-scatter
  Using cached torch_scatter-2.1.1.tar.gz (107 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: torch-scatter
  Building wheel for torch-scatter (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [111 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\placeholder.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\scatter.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\segment_coo.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\segment_csr.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\testing.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\utils.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\__init__.py -> build\lib.win-amd64-cpython-37\torch_scatter
      creating build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\std.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\__init__.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      running egg_info
      writing torch_scatter.egg-info\PKG-INFO
      writing dependency_links to torch_scatter.egg-info\dependency_links.txt
      writing requirements to torch_scatter.egg-info\requires.txt
      writing top-level names to torch_scatter.egg-info\top_level.txt
      reading manifest file 'torch_scatter.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'test'
      adding license file 'LICENSE'
      writing manifest file 'torch_scatter.egg-info\SOURCES.txt'
      running build_ext
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.7) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'torch_scatter._scatter_cpu' extension
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\csrc
      creating build\temp.win-amd64-cpython-37\Release\csrc\cpu
      "D:\Visual Studio Community 2015\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_PYTHON -Dtorchscatter_EXPORTS -Icsrc -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\torch\csrc\api\include -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\TH -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\THC -ID:\anaconda\AnacondaInstall\envs\match\include -ID:\anaconda\AnacondaInstall\envs\match\Include "-ID:\Visual Studio Community 2015\VC\INCLUDE" "-ID:\Visual Studio Community 2015\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpcsrc\cpu\scatter_cpu.cpp /Fobuild\temp.win-amd64-cpython-37\Release\csrc\cpu\scatter_cpu.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0
      cl: 命令行 warning D9002 :忽略未知选项“-O3”
      scatter_cpu.cpp
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/macros/Macros.h(143) : warning C4067: 预处理器指令后有意外标记 - 应输入换行符
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C2146: 语法错误: 缺少“;”(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C2144: 语法错误:“int”的前面应有“;”
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(73) : error C2057: 应输入常量表达式
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/util/C++17.h(27) : fatal error C1189: #error :  You need C++14 to compile PyTorch
      error: command 'D:\\Visual Studio Community 2015\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for torch-scatter
  Running setup.py clean for torch-scatter
Failed to build torch-scatter
Installing collected packages: torch-scatter
  Running setup.py install for torch-scatter ... error
  error: subprocess-exited-with-error

  × Running setup.py install for torch-scatter did not run successfully.
  │ exit code: 1
  ╰─> [113 lines of output]
      running install
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\placeholder.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\scatter.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\segment_coo.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\segment_csr.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\testing.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\utils.py -> build\lib.win-amd64-cpython-37\torch_scatter
      copying torch_scatter\__init__.py -> build\lib.win-amd64-cpython-37\torch_scatter
      creating build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\std.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      copying torch_scatter\composite\__init__.py -> build\lib.win-amd64-cpython-37\torch_scatter\composite
      running egg_info
      writing torch_scatter.egg-info\PKG-INFO
      writing dependency_links to torch_scatter.egg-info\dependency_links.txt
      writing requirements to torch_scatter.egg-info\requires.txt
      writing top-level names to torch_scatter.egg-info\top_level.txt
      reading manifest file 'torch_scatter.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'test'
      adding license file 'LICENSE'
      writing manifest file 'torch_scatter.egg-info\SOURCES.txt'
      running build_ext
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.7) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'torch_scatter._scatter_cpu' extension
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\csrc
      creating build\temp.win-amd64-cpython-37\Release\csrc\cpu
      "D:\Visual Studio Community 2015\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_PYTHON -Dtorchscatter_EXPORTS -Icsrc -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\torch\csrc\api\include -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\TH -ID:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\THC -ID:\anaconda\AnacondaInstall\envs\match\include -ID:\anaconda\AnacondaInstall\envs\match\Include "-ID:\Visual Studio Community 2015\VC\INCLUDE" "-ID:\Visual Studio Community 2015\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpcsrc\cpu\scatter_cpu.cpp /Fobuild\temp.win-amd64-cpython-37\Release\csrc\cpu\scatter_cpu.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0
      cl: 命令行 warning D9002 :忽略未知选项“-O3”
      scatter_cpu.cpp
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/macros/Macros.h(143) : warning C4067: 预处理器指令后有意外标记 - 应输入换行符
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(44) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(45) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(46) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(47) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(48) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(49) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(50) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(51) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(52) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(53) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(54) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(55) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(56) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(57) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C2146: 语法错误: 缺少“;(在标识符“DeviceType”的前面)
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(58) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C2144: 语法错误:“int”的前面应有“;”
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 不支持默认 int
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(61) : error C2086: “int c10::constexpr”: 重定义
              D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(43) : 参见“c10::constexpr”的声明
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/core/DeviceType.h(73) : error C2057: 应输入常量表达式
      D:\anaconda\AnacondaInstall\envs\match\lib\site-packages\torch\include\c10/util/C++17.h(27) : fatal error C1189: #error :  You need C++14 to compile PyTorch
      error: command 'D:\\Visual Studio Community 2015\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> torch-scatter

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259

正确命令

$ pip install  --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.12.1+cu116.html
  • 1

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/458784
推荐阅读
相关标签
  

闽ICP备14008679号