OSError: [WinError 127] 找不到指定的程序

基础条件:

win10 

python 3.6

pytorch1.8

cuda10.2

报错提示:

OSError: [WinError 127] 找不到指定的程序,按照这句报错提示搜索到的指南统统没用,毫无疗效。

从pycharm报错栏往上翻看,涉及到安装的torch_geometric 有问题

问题:

初步判定torch_geometric安装  出错

具体分析:

当时,选用了下载whl离线包的时候不认真,犯了“我以为”的毛病:我以为关联torch-scatter  torch-sparse torch-cluster torch-spline-conv包就是和pytorch匹配的版本即可,没有cpu和gpu之分,其实则不然。

把torch-scatter  torch-sparse torch-cluster torch-spline-conv卸载掉,用以下命令:

pip uninstall  torch-scatter  torch-sparse torch-cluster torch-spline-conv

重新装,使用以下命令:直接安装即可

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.8.0+cu102.html
pip install torch-geometric

 

参考:https://github.com/rusty1s/pytorch_geometric

$ pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
$ pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
$ pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
$ pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
$ pip install torch-geometric

一定要注意版本的匹配,如果使用cu102版本的torch-geometric,就要使用cu102版本的torch-cluster和torch-scatter

参考:https://www.cnblogs.com/liliwang/p/14213646.html

你可能感兴趣的:(python,python)