一条命令解决安装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 的版本
相关推荐
幻影123!3 小时前
从零训练一个会下五子棋的AI
python·深度学习·神经网络·强化学习·五子棋·alpha zero·mokugo
mingo_敏4 小时前
DeepAgents : 检索(Retrieval)
人工智能·深度学习·langchain
Python私教4 小时前
Django 接入 AI 大模型实战:从零做一个流式聊天网站
人工智能·python·django
Python私教4 小时前
Django 接入 MCP 实战:让 AI 安全调用数据库和业务接口
人工智能·python·django
Python私教4 小时前
Django 搭建 AI 本地知识库:文档上传、向量检索与智能问答
人工智能·python·django
always_TT5 小时前
【Python 日志记录:logging 模块入门】
开发语言·python·php
LaughingZhu6 小时前
Product Hunt 每日热榜 | 2026-08-01
人工智能·深度学习·神经网络·搜索引擎·百度
lipku7 小时前
数字人直播开源项目LiveStream
python·开源·数字人·数字人直播
阿童木写作8 小时前
Python实现亚马逊商品图批量智能抠图教程
人工智能·python
axinawang8 小时前
第24课:while循环的应用
python