服务器安装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
相关推荐
一人の梅雨7 分钟前
1688 店铺商品全量采集与智能分析:从接口调用到供应链数据挖掘
开发语言·python·php
Terio_my38 分钟前
Python制作12306查票工具:从零构建铁路购票信息查询系统
开发语言·python·microsoft
万粉变现经纪人1 小时前
如何解决 pip install -r requirements.txt 约束文件 constraints.txt 仅允许固定版本(未锁定报错)问题
开发语言·python·r语言·django·beautifulsoup·pandas·pip
站大爷IP1 小时前
Python定时任务实战:APScheduler从入门到精通
python
云动雨颤1 小时前
Linux卡在emergency mode怎么办?xfs_repair 命令轻松解决
linux·运维·服务器
Fairy_sevenseven1 小时前
[1]python爬虫入门,爬取豆瓣电影top250实践
开发语言·爬虫·python
ThisIsMirror1 小时前
CompletableFuture并行任务超时处理模板
java·windows·python
零基础的修炼2 小时前
Linux---进程信号
运维·服务器
Abstracod2 小时前
centos7 安装病毒扫描软件ClamAV
服务器
java1234_小锋2 小时前
TensorFlow2 Python深度学习 - TensorFlow2框架入门 - 计算图和 tf.function 简介
python·深度学习·tensorflow·tensorflow2