服务器安装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
相关推荐
行云流水剑38 分钟前
【学习记录】如何使用 Python 提取 PDF 文件中的内容
python·学习·pdf
Tender_光1 小时前
iptables实验
运维·服务器
心扬1 小时前
python生成器
开发语言·python
mouseliu1 小时前
python之二:docker部署项目
前端·python
狂小虎2 小时前
亲测解决self.transform is not exist
python·深度学习
Python智慧行囊2 小时前
Python 中 Django 中间件:原理、方法与实战应用
python·中间件·架构·django·开发
szxinmai主板定制专家2 小时前
【飞腾AI加固服务器】全国产化飞腾+昇腾310+PCIe Switch的AI大模型服务器解决方案
运维·服务器·arm开发·人工智能·fpga开发
深科文库2 小时前
构建 MCP 服务器:第 3 部分 — 添加提示
服务器·python·chatgpt·langchain·prompt·aigc·agi
点击查询2 小时前
怎么把自己电脑设置成服务器?
运维·服务器