torch_geometric安装踩坑

一定要按照官网的安装步骤来,否则安装完再导入包时很可能出现DLL链接错误。
具体安装步骤:
首先命令行查看自己电脑安装的pytorchcuda版本:

python -c "import torch; print(torch.__version__)"
python -c "import torch; print(torch.version.cuda)"

之后下载对应版本的torch_geometric四个依赖包:

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

最后安装torch-geometric

pip install torch-geometric

官网链接:
https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html

猜你喜欢

转载自blog.csdn.net/spatial_coder/article/details/121757461
今日推荐