前提・実現したいこと
以下のエラーメッセージを解決したいです。
ModuleNotFoundError: No module named 'torch_sparse'
発生している問題・エラーメッセージ
pip install torch-sparseをしたところ以下のエラーが出ました。
ERROR: Command errored out with exit status 1: command: 'C:\Users\kdais\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"'; __file__='"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\kdais\AppData\Local\Temp\pip-wheel-hcdbwabe' cwd: C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\ Complete output (1412 lines): No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin' running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\add.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\bandwidth.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\cat.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\coalesce.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\convert.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\diag.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\eye.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\index_select.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\masked_select.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\matmul.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\metis.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\mul.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\narrow.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\padding.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\permute.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\reduce.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\rw.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\saint.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\sample.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\select.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\spmm.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\spspmm.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\storage.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\tensor.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\transpose.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\utils.py -> build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\__init__.py -> build\lib.win-amd64-3.8\torch_sparse running build_ext C:\Users\kdais\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] 謖\x87螳壹&繧後◆繝輔ぃ繧、繝ォ縺瑚ヲ九▽縺九j縺セ縺帙s縲\x82 warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'torch_sparse._convert_cpu' extension creating build\temp.win-amd64-3.8 (途中省略) ERROR: Failed building wheel for torch-sparse Running setup.py clean for torch-sparse Failed to build torch-sparse Installing collected packages: torch-sparse Running setup.py install for torch-sparse ... - WARNING: Subprocess output does not appear to be encoded as cp932 error ERROR: Command errored out with exit status 1: command: 'C:\Users\kdais\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"'; __file__='"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kdais\AppData\Local\Temp\pip-record-1jcdr6us\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\kdais\Anaconda3\Include\torch-sparse' cwd: C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\ Complete output (1412 lines): No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin' running install running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\torch_sparse copying torch_sparse\add.py -> build\lib.win-amd64-3.8\torch_sparse (途中省略) error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\kdais\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"'; __file__='"'"'C:\Users\kdais\AppData\Local\Temp\pip-install-o6cyilfv\torch-sparse\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kdais\AppData\Local\Temp\pip-record-1jcdr6us\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\kdais\Anaconda3\Include\torch-sparse' Check the logs for full command output.
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
Windows10
Python 3.8.5
torch 1.9.0
torch-geometric 1.7.2
torch-scatter 2.0.7
torchvision 0.10.0
nvcc: NVIDIA (R) Cuda compiler driver
Cuda compilation tools, release 9.0, V9.0.176
あなたの回答
tips
プレビュー