服务器安装pytorch_geometric torch_scatter踩坑记录

bash 复制代码
conda create -n pyg python==3.8.12
pip install torch==1.13.0

安装的版本如下

bash 复制代码
pip install torch-scatter
pip install torch-sparse
pip install torch-cluster
pip install torch-spline-conv
pip install torch-geometric==2.2.0
pip install ipykernel
python -m ipykernel install --name pyg --user

此时会出现

在torch_scatter包中,出现

python scatter_max算子不适配报错,RuntimeError: Not compiled with CUDA support的错误

解决办法如下

torch scatter的版本如下

bash 复制代码
ERROR: Could not find a version that satisfies the requirement torch-scatter==2.0.1 (from versions: 0.3.0, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.0+pt113cu117, 2.1.1, 2.1.1+pt113cu117, 2.1.2)

默认选择安装torch_scatter2.1.2

请使用下面的命令就可以卸载并重新安装torch_scatter包了,这样就可以愉快的跑代码了

bash 复制代码
pip uninstall torch_scatter
pip install torch-scatter==2.1.1 -f https://pytorch-geometric.com/whl/torch-1.13.0+cu117.html --no-cache-dir
相关推荐
恒53925 分钟前
Linux文件系统I
linux·运维·服务器
阿成学长_Cain38 分钟前
Linux ipcs 命令超全详解:查看共享内存 / 消息队列 / 信号量,IPC 运维必备
linux·运维·服务器·网络·数据库
nothing&nowhere1 小时前
用 Python 做问卷数据清洗:无效样本检测与处理实战
开发语言·python·数据清洗·数据处理·问卷星·问卷星脚本·刷问卷
青瓦梦滋1 小时前
协议定制/序列化-反序列化(Linux视角)
linux·服务器·网络·c++
花酒锄作田1 小时前
如何发布自己的 Python 库到 PyPI
python
researcher-Jiang2 小时前
Design Patterns——Template Method入门到情景实战
python·设计模式·模板方法模式
飞猪~6 小时前
LangChain python 版本 第一集
开发语言·python·langchain
2601_956319886 小时前
最新AI量化提效,先做可验证的小流程
人工智能·python