我是靠谱客的博主 谦让马里奥,这篇文章主要介绍torch,torchvision,torch-sparse,torch-scatter版本问题,现在分享给大家,希望可以做个参考。

最近安装torch,torch-sparse,torch-scatter,torch-cluster,torch-spline-conv,遇到版本不匹配的问题,试了很多,找到了解决办法。^_ ^,磕盐人呀,必须解决。

1.已有基础:

复制代码
1
2
3
Cuda:10.1 Cudnn:7.6.5

2.再此基础上安装:在官网https://pytorch.org/get-started/previous-versions/ 可以找到cuda对应的pytorch的版本,以及选择是否安装GPU。这里选择使用命令,#cuda=10.1使用命令。# pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

复制代码
1
2
3
4
pytorch:1.7.1+cu101 torchvision:0.8.2+cu101 torchaudio:0.7.2

3.pytorch基础的库已经安装好了。后面在安装torch-sparse,torch-scatter,torc-cluster,torch-spline-conv,torch-geometric直接使用pip install命令安装又遇到了版本不匹配的问题,(出现缺失文件pyd)问题如下:

Could not find module
‘E:Anaconda3.8Libsite-packagestorch_sparse_convert_cuda.pyd’ (or
one of its dependencies). Try using the full path with constructor
syntax.。

4.大半天的时间,其实也没有,然后有找到了很多博客,终于解决。使用命令

复制代码
1
2
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
复制代码
1
2
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
复制代码
1
2
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
复制代码
1
2
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
复制代码
1
2
pip installtorch-geometric

如下图在这里插入图片描述
5.最后展示pip list里的torch,torchvision,torchaudio,torch-sparse,torch-scatter,torc-cluster,torch-spline-conv,torch-geometric的版本。
在这里插入图片描述
6.完事了,下次再见。

最后

以上就是谦让马里奥最近收集整理的关于torch,torchvision,torch-sparse,torch-scatter版本问题的全部内容,更多相关torch内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部