当前位置:网站首页>矩池云快速安装torch-sparse、torch-geometric等包
矩池云快速安装torch-sparse、torch-geometric等包
2022-07-31 04:45:00 【机器学习是魔鬼】
租用机器,按自己需要的环境选择一个环境,我这里选择的是Pytorch 1.10。

租用成功后点击租用页面的 Jupyterlab 链接。

Jupyterlab 里新建一个Terminal 用来安装环境,先检查Pytorch、CUDA版本,如下图可以看到我的环境Pytorch 1.10.0,CUDA 11.3。

接下来安装 torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric 这些包。
- PyG 官方提供的安装方法(部分torch版本下安装会出错):
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-{version}+cu{version}.html
其中官方源链接中的torch和cuda版本需要改成自己服务器环境中对应的。
https://data.pyg.org/whl/torch-{version}+cu{version}.html
如 CUDA11.3 Pytorch1.10.0 对应链接:https://data.pyg.org/whl/torch-1.10.0+cu113.html官方安装方法可能出现问题: 由于 pip 安装时如果不指定包的版本时,默认会安装最新版本,以 CUDA11.3 Pytorch1.10.0 安装 torch-sparse 为例子,从官方源可以看到 torch-sparse 最新版本是 0.6.13,但是机器默认源中最新版本是:0.6.14,所以在安装过程中即使我们指定了 -f 参数,pip 也会选择从默认源安装更新的 0.6.14(容易出错,还需要编译,很麻烦)。
- 我们建议的安装方法:
安装 torch-sparse 的时候指定版本和官方源地址,这样安装都时候就会从官方源下载包安装了,官方提供的是已经在对应环境下编译好的 whl 安装包,可以免除编译过程,安装更快,也不会出现不必要的错误。
得到下面安装指令(注意我是 CUDA11.3 Pytorch1.10.0,如果你是其他版本,请将官方源中torch和cuda版本改成自己对应的):
pip install torch-scatter torch-sparse==0.6.13 torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-1.10.0+cu113.html安装完成上面包后,再安装 torch-geometric,torch-geometric不在官方源中,所以直接 pip install 就好:
pip install torch-geometric注意: 如果有版本要求,可以在安装的时候指定版本,这样更容易安装成功。
以上都安装完成后就可以成功导入相关包啦。

具体使用参考:官方文档
边栏推荐
- ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
- On Governance and Innovation | 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum was successfully held
- ENSP, VLAN division, static routing, comprehensive configuration of Layer 3 switches
- (4) Recursion, variable parameters, access modifiers, understanding main method, code block
- PCL 计算点云坐标最值及其索引
- binom二项分布,
- el-image tag doesn't work after binding click event
- qlib架构
- C语言表白代码?
- 已解决(最新版selenium框架元素定位报错)NameError: name ‘By‘ is not defined
猜你喜欢

MySQL数据库必会的增删查改操作(CRUD)

Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法

Unity手机游戏性能优化系列:针对CPU端的性能调优

Learning DAVID Database (1)

30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully

【debug锦集】Expected input batch_size (1) to match target batch_size (0)

ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法

VScode+ESP32 quickly install ESP-IDF plugin
![[Paper reading] Mastering the game of Go with deep neural networks and tree search](/img/4f/899da202e13bd561bbfdbaeebe4d2e.jpg)
[Paper reading] Mastering the game of Go with deep neural networks and tree search

Reinforcement learning: from entry to pit to shit
随机推荐
Basic knowledge of mysql (2)
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
HCIP Day 10_BGP Route Summary Experiment
View source and switch mirrors in two ways: npm and nrm
C Implementation of Simple Network File Copy
行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
问题7:列表的拼接
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
MySQL模糊查询可以使用INSTR替代LIKE
【小土堆补充】Pytorch学习笔记_Anaconda虚拟环境使用
[Linear Neural Network] softmax regression
【云原生】DevOps(五):集成Harbor
three.js make 3D photo album
Unity资源管理系列:Unity 框架如何做好资源管理
30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully
Safety 20220715
.NET-9.乱七八糟的理论笔记(概念,思想)
(8) Math class, Arrays class, System class, Biglnteger and BigDecimal classes, date class
Can't load /home/Iot/.rnd into RNG
pom文件成橘红色未加载的解决方案