当前位置:网站首页>矩池云快速安装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注意: 如果有版本要求,可以在安装的时候指定版本,这样更容易安装成功。
以上都安装完成后就可以成功导入相关包啦。

具体使用参考:官方文档
边栏推荐
- Puzzle Game Level Design: Reverse Method--Explaining Puzzle Game Level Design
- 【py脚本】批量二值化处理图像
- Regarding the primary key id in the mysql8.0 database, when the id is inserted using replace to be 0, the actual id is automatically incremented after insertion, resulting in the solution to the repea
- npm、nrm两种方式查看源和切换镜像
- Safety 20220718
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
- volatile内存语义以及实现 -volatile写和读对普通变量的影响
- Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析
- Lua,ILRuntime, HybridCLR(wolong)/huatuo hot update comparative analysis
- Smartcom Programming Level 4 - Magic Academy Lesson 6
猜你喜欢

STM32HAL library modifies Hal_Delay to us-level delay

WPF WPF 】 【 the depth resolution of the template

MySQL based operations

Recursive implementation of the Tower of Hanoi problem

Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined

Unity框架设计系列:Unity 如何设计网络框架

BUG消灭者!!实用调试技巧超全整理

Open Source Smart Future | 2022 OpenAtom Global Open Source Summit OpenAtom openEuler sub-forum was successfully held

VScode+ESP32 quickly install ESP-IDF plugin

【C语言进阶】文件操作(一)
随机推荐
关于出现大量close_wait状态的理解
重磅 | 基金会为白金、黄金、白银捐赠人授牌
el-image tag doesn't work after binding click event
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
MySQL模糊查询可以使用INSTR替代LIKE
重磅 | 开放原子校源行活动正式启动
【C语言进阶】文件操作(一)
强化学习:从入门到入坑再到拉屎
qlib自动化quant
[shell basics] determine whether the directory is empty
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
产学研用 共建开源人才生态 | 2022开放原子全球开源峰会教育分论坛圆满召开
【py脚本】批量二值化处理图像
idea工程明明有依赖但是文件就是显示没有,Cannot resolve symbol ‘XXX‘
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
open failed: EACCES (Permission denied)
【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
手把手实现图片预览插件(三)
Exsl file preview, word file preview web page method
[C language] Detailed explanation of operators