错误处理:安装torch-sparse、torch-spline、torch-scatter、torch-cluster
生活随笔
收集整理的這篇文章主要介紹了
错误处理:安装torch-sparse、torch-spline、torch-scatter、torch-cluster
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題描述
安裝torch-sparse的時候,出現了這樣的錯誤
pip install torch-sparse ValueError: underlying buffer has been detached---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\16000\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\16000\\AppData\\Local\\Temp\\pip-install-d9hgz4t9\\torch-sparse_698c5c1e115f4cf0b4a5f0fa07153d3f\\setup.py'"'"'; __file__='"'"'C:\\Users\\16000\\AppData\\Local\\Temp\\pip-install-d9hgz4t9\\torch-sparse_698c5c1e115f4cf0b4a5f0fa07153d3f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\16000\AppData\Local\Temp\pip-record-ex4y0frr\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\16000\appdata\local\programs\python\python37\Include\torch-sparse' Check the logs for full command output.問題是安裝的torch-sparse和已經安裝好的torch版本不適配
解決方法
1)查看pytorch版本
>>> import torch >>> print(torch.__version__) 1.7.1+cpu2)去??https://pytorch-geometric.com/whl/index.html?找相應的版本
3)點開‘torch-1.7.1+cpu
4)選擇相應的版本,下載之?
下載哪個版本的教程見:報錯解決方法1:‘A GDAL API version must be specified.’_UQI-LIUWJ的博客-CSDN博客
5) 安裝
?
?
總結
以上是生活随笔為你收集整理的错误处理:安装torch-sparse、torch-spline、torch-scatter、torch-cluster的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 错误处理:RuntimeError: [
- 下一篇: pytorch 笔记:torch_geo