bash
conda create -n pyg python==3.8.12
pip install torch==1.13.0
安装的版本如下
bash
pip install torch-scatter
pip install torch-sparse
pip install torch-cluster
pip install torch-spline-conv
pip install torch-geometric==2.2.0
pip install ipykernel
python -m ipykernel install --name pyg --user
此时会出现
在torch_scatter包中,出现
python scatter_max算子不适配报错,RuntimeError: Not compiled with CUDA support的错误
解决办法如下
torch scatter的版本如下
bash
ERROR: Could not find a version that satisfies the requirement torch-scatter==2.0.1 (from versions: 0.3.0, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.0+pt113cu117, 2.1.1, 2.1.1+pt113cu117, 2.1.2)
默认选择安装torch_scatter2.1.2
请使用下面的命令就可以卸载并重新安装torch_scatter
包了,这样就可以愉快的跑代码了
bash
pip uninstall torch_scatter
pip install torch-scatter==2.1.1 -f https://pytorch-geometric.com/whl/torch-1.13.0+cu117.html --no-cache-dir