1. First switch to CMD and open the Python interactive environment

  2. Type to view the version of PyTorch you have installed

    import torch
    print(torch.__version__)
    Copy the code

    My current PyTorch version is >>> 1.6.0

  3. Install dependencies and burnts-Geometric

    pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
    pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
    pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
    pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
    pip install torch-geometric
    Copy the code

    Where is the{TORCH} should be passed through specific CUDA versions (replaced CPU, CU92, CU101, CU102, CU110) and PyTorch versions (1.4.0, 1.5.0, 1.6.0, 1.7.0) respectively. For example, for PyTorch 1.7.0 and CUDA 11.0, type:

    PIP install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html PIP install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html PIP install torch- cluster-f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html PIP install torch-spline- conv-f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html PIP install torch - geometricCopy the code

    An error message is displayed indicating that the torch cluster cannot be installed. The solution is as follows: Download the torch version from https://pytorch-geometric.com/whl/. My torch version is 1.6.0+ CPU

    2. If the Python version is 3.7.7, download the. WHL file and install it locally.

    3. Run PIP install to download the. WHL file. Successful installation

  4. Checking the Installation Result

    import torch
    import torch_geometric
    Copy the code

    Installation successful, end!

Those interested can add QQ: 3271330538 and click 666 to get python materials