安装torch-scatter踩坑记录

之前下载后总是报错
直接下载whl文件pip install 都还是报错
OSError Traceback (most recent call last)
/tmp/ipykernel_1271/4108300309.py in
----> 1 from torch_scatter import scatter

~/miniconda3/lib/python3.8/site-packages/torch_scatter/init.py in
14 spec = cuda_spec or cpu_spec
15 if spec is not None:
—> 16 torch.ops.load_library(spec.origin)
17 elif os.getenv(‘BUILD_DOCS’, ‘0’) != ‘1’:
18 raise ImportError(f"Could not find module ‘{library}_cpu’ in "

~/miniconda3/lib/python3.8/site-packages/torch/_ops.py in load_library(self, path)
102 # static (global) initialization code in order to register custom
103 # operators with the JIT.
–> 104 ctypes.CDLL(path)
105 self.loaded_libraries.add(path)
106

~/miniconda3/lib/python3.8/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error, winmode)
379
380 if handle is None:
–> 381 self._handle = _dlopen(self._name, mode)
382 else:
383 self._handle = handle
/root/miniconda3/lib/python3.8/site-packages/torch_scatter/_version_cuda.so: undefined symbol: ZN3c106detail23torchInternalAssertFailEPKcS2_jS2_S2

重新下载后好了

pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu102.html

也可以改变后面的torch和cuda的版本号

pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu111.html

安装torch sparse

 pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.1+cu111.html
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值