当前位置:网站首页>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
边栏推荐
- Centos7 install mysql5.7 steps (graphical version)
- Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined
- MySQL database addition, deletion, modification and query (detailed explanation of basic operation commands)
- MySQL database installation (detailed)
- MySQL优化之慢日志查询
- Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
- centos7安装mysql5.7
- .NET-6.WinForm2.NanUI学习和总结
- Go语学习笔记 - 处理超时问题 - Context使用 | 从零开始Go语言
- prompt.ml/15中<svg>标签使用解释
猜你喜欢

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

【C语言】操作符详解

XSS shooting range (3) prompt to win

centos7安装mysql5.7

Multiple table query of sql statement

SOLVED: After accidentally uninstalling pip (two ways to manually install pip)

论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开

Unity URP渲染管线摄像机核心机制剖析

Unity Fighter

npm、nrm两种方式查看源和切换镜像
随机推荐
Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析
MySQL transaction (transaction) (this is enough..)
MySQL开窗函数
A complete introduction to JSqlParse of Sql parsing and conversion
【R语言】【3】apply,tapply,lapply,sapply,mapply与par函数相关参数
Duplicate entry ‘XXX‘ for key ‘XXX.PRIMARY‘解决方案。
Vue项目通过node连接MySQL数据库并实现增删改查操作
.NET-9. A mess of theoretical notes (concepts, ideas)
MySQL数据库增删改查(基础操作命令详解)
1. Get data - requests.get()
Duplicate entry 'XXX' for key 'XXX.PRIMARY' solution.
Unity URP渲染管线摄像机核心机制剖析
HCIP第十天_BGP路由汇总实验
On Governance and Innovation | 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum was successfully held
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
Unity手机游戏性能优化系列:针对CPU端的性能调优
MySQL optimization: from ten seconds to three hundred milliseconds
STM32HAL library modifies Hal_Delay to us-level delay
Create componentized development based on ILRuntime hot update
MySQL优化:从十几秒优化到三百毫秒