有没有在成功装上0.4版本的,介绍一下安装方法

代码中有一句with torch.no_grad一直编译不通过,查过之后发现是0.4上的函数,所以就想装0.4版本的,发下只有,在github上才可以装,按照他的提示却一直装不上
已邀请:

一只菜鸟 - 在校小菜鸡

赞同来自:

我想装cpu版本的,下面是错误代码
~/pytorch/aten/build ~/pytorch/aten ~/pytorch
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DNO_CUDA=1 -DNO_NNPACK=0 -DCUDNN_INCLUDE_DIR= -DCUDNN_LIB_DIR= -DCUDNN_LIBRARY= -DNO_MKLDNN=1 -DMKLDNN_INCULDE_DIR= -DMKLDNN_LIB_DIR= -DMKLDNN_LIBRARY= -DATEN_NO_CONTRIB=1 -DCMAKE_INSTALL_PREFIX=/home/kong/pytorch/torch/lib/tmp_install -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_SHARED_LINKER_FLAGS=
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:9 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

 

一只菜鸟 - 在校小菜鸡

赞同来自:

已解决
用这两行命令:

sudo apt-get update
sudo apt-get install -y build-essential
 

要回复问题请先登录注册