(完全解决)Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platfo

前言

服务器上安装了一个包,然后这个包好像顺便把一些其他包给更新了,然后在远程连接服务器的时候就出现了问题。

!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.
See pytorch/CONTRIBUTING.md at master · pytorch/pytorch for help
with compiling PyTorch from source.
!!!

解决方案

进入你的主目录,修改如下文件。

vim .bashrc

在最后一行写入:

export CXX=g++

保存退出。运行如下命令使立即生效。

source .bashrc

你可能感兴趣的:(安装以及错误,pytorch,c++,深度学习)