环境详情:
CUDA11.2
安装正确Pytorch1.8.0-cu11.1
版本安装正确
报错信息
在安装torch-cluster
和torch-scatter
时,直接如下命令安装报错:
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.8.0+cu112.html
解决方法
- 首先确定你是存在
/usr/local/cuda-11.2/bin/nvcc
文件的:
/usr/local/cuda-11.2/bin/nvcc -V
那么报如上错误就是权限问题,解决方法也很简单,给sudo权限即可,我这里使用的conda环境,因此在执行时务必指定conda的python执行器。
- 查询Conda的Python执行器:
whereis python
sudo
+指定python路径执行pip下载命令:
sudo /home/innox/anaconda3/envs/fiery/bin/python3.7 -m pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.8.0+cu112.html
成功安装~