服务器:Ubuntu 16.04
CUDA:10.0
创建一个conda环境:
conda create -n haha python==3.6
安装torch
pip install torch-1.4.0+cu100-cp36-cp36m-linux_x86_64.whl
【https://download.pytorch.org/whl/cu100/torch_stable.html】
安装torchvision
pip install torchvision-0.5.0+cu100-cp36-cp36m-linux_x86_64.whl
【https://download.pytorch.org/whl/cu100/torch_stable.html】
安装套件
pip install torch_geometric==1.1
pip install torch_scatter-2.0.4+cu100-cp36-cp36m-linux_x86_64.whl
pip install torch_sparse-0.6.0+cu100-cp36-cp36m-linux_x86_64.whl
pip install torch_cluster-1.5.2+cu100-cp36-cp36m-linux_x86_64.whl
【可以从网站上找其他版本:
https://pytorch-geometric.com/whl/torch-1.4.0.html
】
然后 :
就有了问题:
python: symbol lookup error: /usr/lib/python3.6/site-packages/torch/lib/libtorch_python.so: undefined symbol: PySlice_Unpack
据说是,torch 1.4.0和python3.6不兼容,解决方法,升级python:
conda install python=3.6
另外,真正运行的时候 还会有一些小问题,可以自己去修改试试。
比如:
scatter_add() expected at most 5 argument(s) but received 6 argument(s). Declaration: scatter_add(Tensor src, Tensor index, int dim=-1, Tensor? out=None, int? dim_size=None) -> (Tensor)
解决方案,去报错的地方,删除多余的那个参数fill_value。据说是 之前的版本才有这个参数,2.+已经🈚️了