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

具体使用参考:官方文档
边栏推荐
- three.js make 3D photo album
- 简易网络文件拷贝的C实现
- 开放原子开源基金会秘书长孙文龙 | 凝心聚力,共拓开源
- Unity手机游戏性能优化系列:针对CPU端的性能调优
- MATLAB/Simulink & & STM32CubeMX tool chain completes model-based design development (MBD) (three)
- [Linear Neural Network] softmax regression
- MySQL based operations
- visual studio 那些提高效率的快捷键,总结(不时更新)
- Win10 CUDA CUDNN 安装配置(torch paddlepaddle)
- SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
猜你喜欢

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

VScode+ESP32 quickly install ESP-IDF plugin

专访 | 阿里巴巴首席技术官程立:云+开源共同形成数字世界的可信基础

扫雷小游戏——C语言

ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)

STM32HAL库修改Hal_Delay为us级延时

XSS靶场(三)prompt to win

exsl文件预览,word文件预览网页方法

Postgresql 15 source code analysis (5) - pg_control

PWN ROP
随机推荐
聚变云原生,赋能新里程 | 2022开放原子全球开源峰会云原生分论坛圆满召开
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
C语言表白代码?
【C语言】操作符详解
Win10 CUDA CUDNN 安装配置(torch paddlepaddle)
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
问题7:列表的拼接
MySQL database backup
Bubble sort, selection sort, insertion sort, binary search directly
MySQL database addition, deletion, modification and query (detailed explanation of basic operation commands)
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
Recursive implementation of the Tower of Hanoi problem
MySQL fuzzy query can use INSTR instead of LIKE
30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully
Why don't you programmers make a living off your own projects?And have to work for someone else?
行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
exsl文件预览,word文件预览网页方法
Unity资源管理系列:Unity 框架如何做好资源管理
Industry landing presents new progress | 2022 OpenAtom Global Open Source Summit OpenAtom OpenHarmony sub-forum was successfully held
[py script] batch binarization processing images