Mac M1 Max配置torch-geometric等深度学习库

前提:此电脑中已经安装好了Anaconda环境

(一)查看创建的虚拟环境中torch的版本
import torch
torch.__version__

在这里插入图片描述

(二)针对安装的 torch 版本,去官网下载torch-geometric 依赖的对应版本 torch-sparsetorch-clustertorch-spline-convtorch-scatter库的whl文件。然后,pip安装。
pip install 你的下载地址/torch_sparse.......whl

在这里插入图片描述
或者
直接使用命令下载对应版本安装

pip --no-cache-dir  install  torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+${cpu}.html
pip --no-cache-dir  install  torch-sparse -f https://data.pyg.org/whl/torch-1.12.1+${cpu}.html
pip --no-cache-dir  install  torch-cluster -f https://data.pyg.org/whl/torch-1.12.1+${cpu}.html
pip --no-cache-dir  install  torch-spline-conv -f https://data.pyg.org/whl/torch-1.12.1+${cpu}.html
(三)安装torch-geometric
pip install torch_geometric

都需要较长的安装时间。

...
Successfully built torch-scatter
Installing collected packages: torch-scatter
Successfully installed torch-scatter-2.1.2
...
Successfully built torch-sparse
Installing collected packages: torch-sparse
Successfully installed torch-sparse-0.6.18
...
Successfully built torch-cluster
Installing collected packages: torch-cluster
Successfully installed torch-cluster-1.6.3
...
Successfully built torch-spline-conv
Installing collected packages: torch-spline-conv
Successfully installed torch-spline-conv-1.2.2
...
Installing collected packages: psutil, MarkupSafe, jinja2, torch-geometric
Successfully installed MarkupSafe-2.1.5 jinja2-3.1.4 psutil-6.0.0 torch-geometric-2.5.3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值