anaconda下安装torch_geometric

本文介绍了如何通过官方文档解决安装PyTorch过程中遇到的问题,包括确定PyTorch 1.8.0和CUDA 10.2版本,并提供相应的安装包链接。确保按照正确的版本安装以避免错误。

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

官方文档
安装的时候出了很多错误,最后还是按照官网文档才安装好了

pytorch的版本

确定pytorch的版本,最低1.4.0

python -c "import torch; print(torch.__version__)"
>>> 1.8.0

CUDA的版本

确定cuda的版本

python -c "import torch; print(torch.version.cuda)"
>>> 10.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-geometric

将其中${TORCH}${CUDA}替换为第一二步确定的torch和cuda版本。

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-geometric
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值