一条命令解决安装torch_scatter torch_sparse torch_cluster torch_spline

在相应环境下输入

powershell 复制代码
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu118.html

该命令安装了pyg_lib包以及一些与PyTorch相关的包(torch_scatter、torch_sparse、torch_cluster、torch_spline_conv)从特定的包索引URL。指定的PyTorch版本是2.0.0,使用的CUDA版本是11.8。

如果你的版本不是我这样子的,可以输入以下指令查看自己 torch 和 cuda 的版本,然后修改上面那条命令后面的版本数字即可

python 复制代码
import torch
print(torch.__version__)  # 查看 torch 的版本
print(torch.version.cuda)  # 查看 CUDA 的版本
相关推荐
Lyn_Li29 分钟前
Kaggle Top 5 | 198只股票、200条数据的金融预测——BattleFin高分方案从零复现
python·kaggle·比赛复盘·金融预测
Lihua奏4 小时前
从单核到多核:CPU为什么不能再只靠提频变快
深度学习
拾年2755 小时前
大模型的"聪明"从哪来?聊聊 AI 数据集的那些事儿
人工智能·深度学习·机器学习
小九九的爸爸5 小时前
前端想要入门Agent开发,要具备哪些Python基础?
python·agent·ai编程
阿耶同学6 小时前
手把手教你用 LangGraph 搭建三层嵌套 Agent 架构
python·程序员
花酒锄作田1 天前
Pydantic校验配置文件
python
hboot1 天前
AI工程师第四课 - 深度学习入门
pytorch·python·神经网络
ZhengEnCi1 天前
P2M-Matplotlib折线图完全指南-从数据可视化到趋势分析的Python绘图利器
python·matlab·数据可视化
ZhengEnCi1 天前
P2L-Matplotlib饼图完全指南-从数据可视化到图表定制的Python绘图利器
python·matlab
曲幽1 天前
你的REST接口还在“过度投喂”数据吗?——FastAPI + GraphQL实战避坑指南
python·fastapi·web·graphql·route·cors·rest·strawberry