在Linux系统出现一系列问题的解决办法:
1.Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set "Torch_DIR" to a directory containing one of the above files.
原因:没有添加路径
添加绝对路径export Torch_DIR="绝对路径"也就是你肯定是 /home/"用户名"/其他...
在调用命令cmake -DCMAKE_PREFIX_PATH="此处为libtorch的绝对路径"
最后make
2.You need C++14 to compile PyTorch
原因:下载的libtorch版本太高,现在libtorch的版本到1.10,下载了1.2的版本就能够编译成功了