当前位置:网站首页>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.html
There 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.html
After the installation is complete, install torch-geometric, torch-geometric is not in the official source, so just pip install it directly:
pip install torch-geometric
Note: 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
边栏推荐
- EasyExcel的简单读取操作
- ABC D - Distinct Trio(k元组的个数
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
- Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析
- MySQL数据库必会的增删查改操作(CRUD)
- SQL语句中对时间字段进行区间查询
- MySQL window function
- Minesweeper game - C language
- DVWA之SQL注入
- MySQL fuzzy query can use INSTR instead of LIKE
猜你喜欢
Fusion Cloud Native, Empowering New Milestones | 2022 Open Atom Global Open Source Summit Cloud Native Sub-Forum Successfully Held
MySQL transaction isolation level, rounding
CentOS7 安装MySQL 图文详细教程
城市内涝及桥洞隧道积水在线监测系统
PWN ROP
MySQL database addition, deletion, modification and query (detailed explanation of basic operation commands)
mysql数据库安装(详细)
数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
STM32HAL library modifies Hal_Delay to us-level delay
【wpf】wpf中的那些模板之深度解析
随机推荐
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
12个MySQL慢查询的原因分析
.NET-6.WinForm2.NanUI学习和总结
Lua,ILRuntime, HybridCLR(wolong)/huatuo hot update comparative analysis
[Detailed explanation of ORACLE Explain]
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
扫雷小游戏——C语言
Interview | Cheng Li, CTO of Alibaba: Cloud + open source together form a credible foundation for the digital world
MySQL optimization: from ten seconds to three hundred milliseconds
sql语句之多表查询
Hand in hand to realize the picture preview plug-in (3)
Unity打灵狐者
PCL 计算点云坐标最值及其索引
Minesweeper game (written in c language)
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
12 reasons for MySQL slow query
【wpf】wpf中的那些模板之深度解析
MySQL database installation (detailed)
mysql uses on duplicate key update to update data in batches
DVWA安装教程(懂你的不懂·详细)