python 无法安装torch_sparse软件包

ogq8wdun  于 2023-01-19  发布在  Python
关注(0)|答案(3)|浏览(295)
'''
pip install torch_sparse
Collecting torch_sparse
  Using cached torch_sparse-0.6.12.tar.gz (43 kB)
Requirement already satisfied: scipy in /home/tanojlangore/anaconda3/envs/my-rdkit-env/lib/python3.7/site-packages (from torch_sparse) (1.7.3)
Requirement already satisfied: numpy<1.23.0,>=1.16.5 in /home/tanojlangore/anaconda3/envs/my-rdkit-env/lib/python3.7/site-packages (from scipy->torch_sparse) (1.21.2)
Building wheels for collected packages: torch-sparse
  Building wheel for torch-sparse (setup.py) ... [?25l-

'''
它会持续运行无限长的时间...

1cosmwyk

1cosmwyk1#

根据官方文档https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html,如果你使用的PyTorch版本〈=1.9.*,你需要指定你要安装的软件包的版本号,如下所示:

pip3 install torch-sparse==0.6.12 --no-cache-dir -f https://data.pyg.org/whl/torch-1.9.0+cu111.html
uubf1zoe

uubf1zoe2#

我想你可以使用this web tool来找到适合你的工作版本。例如,如果我选择pytorch1.10.* + Linux + pip + CPU,我会得到:

pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.10.0+cpu.html

我只能维持稀疏的火把:

pip install torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+cpu.html

如果你有一个pytorch〈1.9.* 的版本,你可能会有问题。

2ic8powd

2ic8powd3#

你等了多久了?我也以为我有问题,但15-20分钟后突然结束了

相关问题