在 Ubuntu 18.04 上使用 python3.8 将 pytorch 1.7 安装到 Xavier NX (JetPack 4.4)

问题描述

我正在使用此 reference 在 Ubuntu 18.04 上将带有 python3.8 的 Torch 1.7 安装到 Xavier NX (JetPack 4.4)。我在 python3.8 setup.py install 之后运行 python3.8 setup.py build 时出错。


    Install the project...
    -- Install configuration: "Release"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/lib/libtorch_cuda.so" to "$ORIGIN:/usr/local/cuda/lib64:/usr/lib/aarch64-linux-gnu/openmpi/lib"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/lib/libtorch.so" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_atomic_ops_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_complex_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_complex_math_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_integer_divider_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_half_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_distributions_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_optional_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_packedtensoraccessor_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_vectorized_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/test/cuda_generator_test" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/lib/libtorchbind_test.so" to "$ORIGIN:/usr/local/cuda/lib64"
    -- Set runtime path of "/home/costar/Documents/pytorch/torch/lib/libjitbackend_test.so" to "$ORIGIN:/usr/local/cuda/lib64"
    CMake Error at test_jit/cmake_install.cmake:90 (file):
      file RPATH_CHANGE Could not write new RPATH:
    
        $ORIGIN:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs
    
      to the file:
    
        /home/costar/Documents/pytorch/torch/bin/test_jit
    
      No valid ELF RPATH or RUNPATH entry exists in the file; Failed to load
      section headers.
    Call Stack (most recent call first):
      caffe2/cmake_install.cmake:3191 (include)
      cmake_install.cmake:111 (include)
    
    
    Makefile:61: recipe for target 'install' Failed
    make: *** [install] Error 1
    Traceback (most recent call last):
      File "setup.py",line 727,in 
        build_deps()
      File "setup.py",line 314,in build_deps
        build_caffe2(version=version,File "/home/costar/Documents/pytorch/tools/build_pytorch_libs.py",line 62,in build_caffe2
        cmake.build(my_env)
      File "/home/costar/Documents/pytorch/tools/setup_helpers/cmake.py",line 346,in build
        self.run(build_args,my_env)
      File "/home/costar/Documents/pytorch/tools/setup_helpers/cmake.py",line 141,in run
        check_call(command,cwd=self.build_dir,env=env)
      File "/usr/lib/python3.8/subprocess.py",line 364,in check_call
        raise CalledProcessError(retcode,cmd)
    subprocess.CalledProcessError: Command '['cmake','--build','.','--target','install','--config','Release','--','-j','2']' returned non-zero exit status 2.

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)