在win10上安装pytorch_cluster的方法

已经装了2.4.1版本的torch

直接输入conda install 显示让我从官网下载:

torch_scatter ,torch-sparse,torch-cluster等系列安装_安装torch, torch-scatter, torch-sparse-CSDN博客

于是我搜索教程,按照上面的安装,因为我的torch2.4.1,配套的cuda是11.8,因此我输入命令:

pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-2.4.1+cu118.html

又有警告又有报错,先解决报错:

(deeprs) PS G:\YJY\test\test1\deep-rs-Master> pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-2.4.1+cu118.html              
DEPRECATION: Loading egg at g:\anaconda3\envs\deeprs\lib\site-packages\pypiwin32-223-py3.12.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
DEPRECATION: Loading egg at g:\anaconda3\envs\deeprs\lib\site-packages\pytorch3d-0.7.8-py3.12-win-amd64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Looking in links: https://pytorch-geometric.com/whl/torch-2.4.1+cu118.html
Collecting torch-cluster
  Downloading torch_cluster-1.6.3.tar.gz (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 218.3 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: scipy in g:\anaconda3\envs\deeprs\lib\site-packages (from torch-cluster) (1.13.1)
Requirement already satisfied: numpy<2.3,>=1.22.4 in g:\anaconda3\envs\deeprs\lib\site-packages (from scipy->torch-cluster) (1.26.4)
Building wheels for collected packages: torch-cluster
  Building wheel for torch-cluster (setup.py) ... error
  error: subprocess-exited-with-error
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for torch-cluster
  Running setup.py clean for torch-cluster
Failed to build torch-cluster
ERROR: Could not build wheels for torch-cluster, which is required to install pyproject.toml-based projects

整个报错篇幅很长,只节选了有error的部分,在网上没有搜到一样的错误,猜测是没有wheel文件,因此我搜了另一个安装教程:

python安装torch-cluster、torch-scatter、torch-sparse和torch-geometric-CSDN博客

在这个教程提供的网页里,我进入了一个whl库,我选择torch240+cuda118(但我其实是241,whl库里没有241版本),然后出现这些:

网页:https://download.pytorch.org/whl/torch_stable.html

我不知道cp312是什么,选了这个版本:pip install torch_scatter-2.1.2+pt24cu118-cp312-cp312-win_amd64.whl

显示安装成功:

Processing g:\yjy\test\test1\deep-rs-master\torch_cluster-1.6.3+pt24cu118-cp312-cp312-win_amd64.whl
Requirement already satisfied: scipy in g:\anaconda3\envs\deeprs\lib\site-packages (from torch-cluster==1.6.3+pt24cu118) (1.13.1)
Requirement already satisfied: numpy<2.3,>=1.22.4 in g:\anaconda3\envs\deeprs\lib\site-packages (from scipy->torch-cluster==1.6.3+pt24cu118) (1.26.4)
Installing collected packages: torch-cluster
Successfully installed torch-cluster-1.6.3+pt24cu118

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值