【冰糖Python】PyTorch Geometric 安装

本文档详细介绍了如何通过二进制文件安装PyTorchGeometric。首先确认已安装PyTorch及其对应的CUDA版本,然后根据版本安装torch-scatter、torch-sparse、torch-cluster、torch-spline-conv等依赖库,最后安装torch-geometric。提供了针对PyTorch1.7.1CPU版本的安装命令示例,并给出了查看最新版本的链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

此文记录通过二进制文件安装 PyTorch Geometric 的过程

 

1)确认 PyTorch 是否已经安装,可参考此文安装 PyTorch,比如安装了 PyTorch 1.7.1 cpu 版本

2)确认 所安装的 PyTorch 对应的 CUDA 的版本,比如 CUDA 11.0 或 cpu 版本

3)根据 1)和 2)对应的版本安装以下依赖库

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-geometric

其中,${TORCH} 和 ${CUDA} 分别替换为 1)和 2)中确认的版本

${TORCH} 可选 {1.4.0, 1.5.0, 1.6.0, 1.7.0},PyTorch 1.7.1 选 1.7.0

${CUDA} 可选 {cpu,cu92,cu101,cu102,cu110}

则假设使用 PyTorch 1.7.1 cpu 版本,安装以上依赖为:


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

冰糖不在家

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值