torch_sparse 安装教程
第一步conda创建python3.8环境
conda create -n py3.8 python==3.8
conda activate py3.8
第二步 安装pytorch
去官网上下载,注意挑选pytorch-cuda,我选的是pytorch-10.1-cuda10.2
如果在安装过程中出现任何下述情况:
1.“InvalidArchiveError(‘Error with archive /home/lyy/miniconda3/pkgs/pytorch-1.10.1-py3.8_cuda10.2_cudnn7.6.5_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message was:\n\nfailed with error: [Errno 28] No space left on device’)”
2. “CondaError: Failed to write to /home/lyy/miniconda3/pkgs/pytorch-1.10.1-py3.8_cuda10.2_cudnn7.6.5_0.tar.bz2”
不要犹豫,直接 :conda clean -a
第三步 安装对应的torch_sparse和torch_scatter
前往该网站把对应的版本下载下来,放在“anoconda/pkgs”或"miniconda3/pkgs"中
https://pytorch-geometric.com/whl/
pip3 install … 安装