Install geometric under Linux

There are many ways to install geometric with 1 or 2 commands on the Internet, but I tried a few without success, so I adopted the following rather cumbersome method.

1. Check the python version, pytorch version and cuda version of your machine. Borrow a picture from elsewhere here.

insert image description here

2. According to the pytorch version and cuda version, find the corresponding version on the official website .

insert image description here

3. After entering, find the 4 files (cluster, scatter, sparse, spline) that need to be downloaded according to the python version. Among them, cp37 means that the corresponding python is 3.7.

insert image description here

4. After downloading the above 4 files to the path you want to save, use the following commands to install the 4 packages respectively (regardless of the order).

pip install 文件名

5. After all four packages are installed successfully, use the following command to install geometry. Among them, 1.4.3 is the specified geometric version, or you can not specify the version. In this case, just delete "==1.4.3".

pip install torch-geometric==1.4.3

6. Use the following command to test whether the installation is successful. If no error is reported, the installation is successful.

python -c "import torch_geometric"

Guess you like

Origin blog.csdn.net/qq_42194665/article/details/130029361