I compiled the source and some errors happened

the error:

root@orangepione:~/pytorch# python3 setup.py build_deps
running build_deps
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "5.5")
-- Found gcc >=5 and CUDA <= 7.5, adding workaround C++ flags
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2+PTX
-- Could not find CUDA with FP16 support, compiling without torch.CudaHalfTensor
-- Removing -DNDEBUG from compile flags
-- Compiling with OpenMP support
-- MAGMA not found. Compiling without MAGMA support
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Neon found with compiler flag : -mfpu=neon -D__NEON__
-- Atomics: using GCC intrinsics
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m - dl]
--   Library mkl_gf: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m - dl]
--   Library mkl_intel: not found
-- Checking for [mkl - guide - pthread - m]
--   Library mkl: not found
-- MKL library not found
-- Checking for [openblas]
--   Library openblas: /usr/lib/libopenblas.so
-- Found a library with BLAS API (open).
-- Found a library with LAPACK API. (open)
-- Could NOT find CUDNN (missing:  CUDNN_INCLUDE_DIR CUDNN_LIBRARY)
disabling CUDA because NO_CUDA is set
-- ignoring CUDA
-- Using python found in /usr/bin/python3
['/root/pytorch/aten/src/THNN/generic/THNN.h', '/root/pytorch/aten/src/THCUNN/generic/THCUNN.h', '/root/pytorch/aten/src/ATen/nn.yaml']
ATen Excluded: {'bernoulli_', 'bernoulli'}
disable contrib because ATEN_NO_CONTRIB is set
-- Configuring done
-- Generating done
-- Build files have been written to: /root/pytorch/torch/lib/build/aten
Scanning dependencies of target ATen
[  2%] Building CXX object src/ATen/CMakeFiles/ATen.dir/CUDAGenerator.cpp.o
[  2%] Building CXX object src/ATen/CMakeFiles/ATen.dir/Context.cpp.o
[  3%] Linking CXX shared library libATen.so
[ 79%] Built target ATen
[ 81%] Linking CXX executable scalar_tensor_test
[ 81%] Linking CXX executable basic
[ 82%] Linking CXX executable scalar_test
[ 84%] Linking CXX executable atest
[ 85%] Built target scalar_tensor_test
[ 86%] Built target atest
[ 87%] Built target basic
[ 88%] Built target scalar_test
[ 89%] Linking CXX executable native_test
[ 90%] Linking CXX executable broadcast_test
[ 92%] Linking CXX executable wrapdim_test
[ 93%] Linking CXX executable undefined_tensor_test
[ 94%] Built target native_test
[ 95%] Built target broadcast_test
[ 96%] Built target wrapdim_test
[ 97%] Built target undefined_tensor_test
[ 98%] Linking CXX executable dlconvertor_test
[100%] Built target dlconvertor_test
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/TH.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THAllocator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THMath.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THBlas.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THDiskFile.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THFile.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THFilePrivate.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGeneral.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateAllTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateDoubleType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateFloatType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateHalfType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateLongType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateIntType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateShortType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateCharType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateByteType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateFloatTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THGenerateIntTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THLapack.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THLogAdd.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THMemoryFile.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THRandom.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THSize.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THTensorApply.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THTensorDimApply.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THTensorMacros.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THVector.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THAtomic.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/THHalf.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/vector/AVX.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/vector/AVX2.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THBlas.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THBlas.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THLapack.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THLapack.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THStorage.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THStorageCopy.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THStorageCopy.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensor.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorConv.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorConv.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorCopy.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorCopy.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorLapack.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorLapack.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorMath.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorMath.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorRandom.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorRandom.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THVectorDispatch.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/TH/generic/THVector.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THNN/THNN.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THNN/generic/THNN.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/THS.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/THSGenerateAllTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/THSGenerateFloatTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/THSGenerateIntTypes.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/THSTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensor.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensorMath.c
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensorMath.h
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/libATen.so.1
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/lib/libATen.so
-- Set runtime path of "/root/pytorch/torch/lib/tmp_install/lib/libATen.so.1" to "/root/pytorch/torch/lib/tmp_install/lib"
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/share/cmake/ATen/ATenConfig.cmake
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Formatting.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Scalar.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/ScalarType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUFixedAllocator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CUDAFixedAllocator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/dlpack.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Storage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/TensorAccessor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Generator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseTensorRef.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/DLConvertor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/ArrayRef.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CheckGenerator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/TensorOperators.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Context.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/ATenGeneral.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Utils.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/UndefinedTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/TensorImpl.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/ATen.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Half.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/TensorBase.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/UndefinedType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/WrapDimUtils.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/THLongStorageView.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/ExpandUtils.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUGenerator.h
-- Installing: /root/pytorch/torch/lib/tmp_install/include/ATen/CUDAGenerator.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUByteStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUByteType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUByteTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUCharStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUCharType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUCharTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUDoubleStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUDoubleType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUDoubleTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUFloatStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUFloatType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUFloatTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUIntStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUIntType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUIntTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPULongStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPULongType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPULongTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUShortStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUShortType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUShortTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUHalfStorage.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUHalfType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/CPUHalfTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUByteType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUByteTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUCharType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUCharTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUDoubleType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUDoubleTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUFloatType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUFloatTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUIntType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUIntTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPULongType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPULongTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUShortType.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/SparseCPUShortTensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Type.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Tensor.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/TensorMethods.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Functions.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/Dispatch.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/ATen/NativeFunctions.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/share/ATen/Declarations.yaml
-- Configuring done
-- Generating done
-- Build files have been written to: /root/pytorch/torch/lib/build/nanopb
[100%] Built target protobuf-nanopb
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/lib/libprotobuf-nanopb.a
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/cmake/nanopb/nanopb-targets.cmake
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/cmake/nanopb/nanopb-targets-release.cmake
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/cmake/nanopb/nanopb-config.cmake
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/cmake/nanopb/nanopb-config-version.cmake
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/pb.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/pb_common.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/pb_encode.h
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/pb_decode.h
-- Configuring done
-- Generating done
-- Build files have been written to: /root/pytorch/torch/lib/build/libshm
[ 50%] Built target torch_shm_manager
[ 75%] Linking CXX shared library libshm.so
[100%] Built target shm
Install the project...
-- Install configuration: "Release"
-- Installing: /root/pytorch/torch/lib/tmp_install/lib/libshm.so
-- Set runtime path of "/root/pytorch/torch/lib/tmp_install/lib/libshm.so" to ""
-- Up-to-date: /root/pytorch/torch/lib/tmp_install/include/libshm.h
-- Installing: /root/pytorch/torch/lib/tmp_install/bin/torch_shm_manager
Traceback (most recent call last):
  File "setup.py", line 734, in <module>
    install_requires=['pyyaml', 'numpy'],
  File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 143, in run
    build_libs(libs)
  File "setup.py", line 117, in build_libs
    from tools.nnwrap import generate_wrappers as generate_nn_wrappers
  File "/root/pytorch/tools/nnwrap/__init__.py", line 1, in <module>
    from .generate_wrappers import generate_wrappers, wrap_function, \
  File "/root/pytorch/tools/nnwrap/generate_wrappers.py", line 4, in <module>
    from ..cwrap import cwrap
  File "/root/pytorch/tools/cwrap/__init__.py", line 1, in <module>
    from .cwrap import cwrap
  File "/root/pytorch/tools/cwrap/cwrap.py", line 5, in <module>
    from .plugins import ArgcountChecker, OptionalArguments, ArgumentReferences, \
  File "/root/pytorch/tools/cwrap/plugins/__init__.py", line 425, in <module>
    from .OptionalArguments import OptionalArguments
  File "/root/pytorch/tools/cwrap/plugins/OptionalArguments.py", line 5, in <module>
    from ...shared import cwrap_common
  File "/root/pytorch/tools/shared/cwrap_common.py", line 1
    ../../aten/src/ATen/common_with_cwrap.py
    ^
SyntaxError: invalid syntax

system:Linux version 3.4.113-sun8i
python3.5
no cuda
gcc version 6.3.0 20170519 (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04)

I had created 2GB of SWAP space for compiling
before compiling, I added two flags in the shell :
export NO_CUDA=1
export NO_DISTRIBUTED=1