posted on 2023-06-06 12:06 read(1026) comment(0) like(14) collect(3)
torch, torch-scatter, torch-sparse version dependency problem
"ModuleNotFoundError: No module named 'torch_scatter'" appears when running the program
It cannot be downloaded directly, and it is prone to dependency mismatch. You need to download the corresponding dependent version, first query the cuda version
Enter nvcc -V in the linux command line (in your own virtual environment) to view the corresponding cuda version
My cuda version is 11.6. If you have not downloaded the torch library, you can visit the official website to download the required version: Previous PyTorch Versions | PyTorch
(Since I have downloaded the torch library, torch==1.13.1)
Download the corresponding version of torch_scatter
Open https://pytorch-geometric.com/whl/
You can see many versions of torch and cuda combination, find the corresponding torch and cuda version
Torch-1.13.1+cu116 version has corresponding torch_cluster, torch_scatter, torch_sparse, torch_spline_conv four dependent libraries, pt113 represents the corresponding torch version, cp37 represents the corresponding python version is 3.7, there are linux and windows versions
Install the .whl file
First switch to the directory where the downloaded whl file is located, and enter on the command line:
pip install torch_scatter-2.1.0+pt113cu116-cp37-cp37m-linux_x86_64.whl
So far, congratulations, you have solved a problem
Author:Fiee
link:http://www.pythonblackhole.com/blog/article/80641/ada0a209d97efc775346/
source:python black hole net
Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.
name:
Comment content: (supports up to 255 characters)
Copyright © 2018-2021 python black hole network All Rights Reserved All rights reserved, and all rights reserved.京ICP备18063182号-7
For complaints and reports, and advertising cooperation, please contact vgs_info@163.com or QQ3083709327
Disclaimer: All articles on the website are uploaded by users and are only for readers' learning and communication use, and commercial use is prohibited. If the article involves pornography, reactionary, infringement and other illegal information, please report it to us and we will delete it immediately after verification!