当前位置:网站首页>Moment Pool Cloud quickly installs packages such as torch-sparse and torch-geometric
Moment Pool Cloud quickly installs packages such as torch-sparse and torch-geometric
2022-07-31 04:56:00 【Machine learning is the devil】
Rent a machine and choose an environment according to the environment you need. I chose Pytorch 1.10 here.

Click the Jupyterlab link on the rental page after the rental is successful.

Create a new Terminal in Jupyterlab to install the environment. First check the Pytorch and CUDA versions. You can see my environment Pytorch 1.10.0 and CUDA 11.3 as shown below.

Next install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric packages.
- The official installation method provided by PyG (there will be errors in some torch versions):
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-{version}+cu{version}.html
The torch and cuda versions in the official source link need to be changed to the corresponding ones in their own server environment.
https://data.pyg.org/whl/torch-{version}+cu{version}.htmlSuch as CUDA11.3 Pytorch1.10.0 corresponding link: https://data.pyg.org/whl/torch-1.10.0+cu113.htmlThere may be problems with the official installation method: If the version of the package is not specified during pip installation, the latest version will be installed by default. Take CUDA11.3 Pytorch1.10.0 as an example to install torch-sparse, fromOfficial sourceYou can see that the latest version of torch-sparse is 0.6.13, but the machine defaultsThe latest version in the source is: 0.6.14, so even if we specify the -f parameter during the installation process, pip will choose to install the updated 0.6.14 from the default source (error-prone, also need to compile, very troublesome).
- Our suggested installation method:
When installing torch-sparse, specify the version and the official source address, so that the installation will be installed from the official source download package. The official source is the whl installation package that has been compiled in the corresponding environment, which can avoid the compilation process., the installation is faster, and there are no unnecessary errors.
Get the following installation instructions (note that I am CUDA11.3 Pytorch1.10.0, if you have other versions, please change the torch and cuda versions in the official source to their corresponding ones):
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.htmlAfter the installation is complete, install torch-geometric, torch-geometric is not in the official source, so just pip install it directly:
pip install torch-geometricNote: If there is a version requirement, you can specify the version during installation, which will make the installation easier.
After the above installation is complete, the relevant packages can be successfully imported.

Specific use reference: official documentation
边栏推荐
- 【R语言】【3】apply,tapply,lapply,sapply,mapply与par函数相关参数
- Multiple table query of sql statement
- Unity资源管理系列:Unity 框架如何做好资源管理
- Understanding of the presence of a large number of close_wait states
- 参考代码系列_1.各种语言的Hello World
- MySQL optimization slow log query
- View source and switch mirrors in two ways: npm and nrm
- STM32 - DMA
- MySQL事务(transaction) (有这篇就足够了..)
- ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
猜你喜欢

MySQL开窗函数

数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开

Simple read operation of EasyExcel

Unity Fighter

矩池云快速安装torch-sparse、torch-geometric等包

Interview | Cheng Li, CTO of Alibaba: Cloud + open source together form a credible foundation for the digital world

MySQL transaction (transaction) (this is enough..)

Go language study notes - dealing with timeout problems - Context usage | Go language from scratch

MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
![[debug highlights] Expected input batch_size (1) to match target batch_size (0)](/img/b3/ff6ccc3cd307befad3bd07a9f4a956.png)
[debug highlights] Expected input batch_size (1) to match target batch_size (0)
随机推荐
ABC D - Distinct Trio (Number of k-tuples
CentOS7 —— yum安装mysql
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
Mysql application cannot find my.ini file after installation
DVWA靶场环境搭建
[Cloud Native] DevOps (5): Integrating Harbor
[debug highlights] Expected input batch_size (1) to match target batch_size (0)
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
MySQL忘记密码怎么办
Heavyweight | The Open Atomic School Source Line activity was officially launched
Hand in hand to realize the picture preview plug-in (3)
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
Two address pools r2 are responsible for managing the address pool r1 is responsible for managing dhcp relays
SQL row-column conversion
重磅 | 基金会为白金、黄金、白银捐赠人授牌
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
SQL statement to range query time field
30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully
Minesweeper game (written in c language)