无法安装neural_render_pytorch

6rqinv9w  于 2023-10-20  发布在  其他
关注(0)|答案(1)|浏览(199)

我尝试通过命令“pip install neural_renderer_pytorch”安装neural_render_pytorch。但是有一个很大的错误,我不明白。错误消息:

Running setup.py install for neural-renderer-pytorch ... error
ERROR: Command errored out with exit status 1:
 command: /home/danyilzozulia/PycharmProjects/test/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ilhc49xm/install-record.txt --single-version-externally-managed --compile --install-headers /home/danyilzozulia/PycharmProjects/test/venv/include/site/python3.8/neural-renderer-pytorch
     cwd: /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/
Complete output (209 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/load_obj.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/projection.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/look.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/mesh.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/vertices_to_faces.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/perspective.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/look_at.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/renderer.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/get_points_from_angles.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/rasterize.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/__init__.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/lighting.py -> build/lib.linux-x86_64-3.8/neural_renderer
copying neural_renderer/save_obj.py -> build/lib.linux-x86_64-3.8/neural_renderer
creating build/lib.linux-x86_64-3.8/neural_renderer/cuda
copying neural_renderer/cuda/__init__.py -> build/lib.linux-x86_64-3.8/neural_renderer/cuda
running build_ext
building 'neural_renderer.cuda.load_textures' extension
creating /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8
creating /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer
creating /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda
Emitting ninja build file /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda_kernel.o.d -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/TH -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/THC -I/home/danyilzozulia/PycharmProjects/test/venv/include -I/usr/include/python3.8 -c -c /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda_kernel.cu -o /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda_kernel.o
/usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda_kernel.o.d -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/TH -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/THC -I/home/danyilzozulia/PycharmProjects/test/venv/include -I/usr/include/python3.8 -c -c /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda_kernel.cu -o /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal   : Unknown option '-generate-dependencies-with-compile'
[2/2] c++ -MMD -MF /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/TH -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/THC -I/home/danyilzozulia/PycharmProjects/test/venv/include -I/usr/include/python3.8 -c -c /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp -o /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda.o
c++ -MMD -MF /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/TH -I/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/THC -I/home/danyilzozulia/PycharmProjects/test/venv/include -I/usr/include/python3.8 -c -c /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp -o /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/build/temp.linux-x86_64-3.8/neural_renderer/cuda/load_textures_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
In file included from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:140,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/ParallelOpenMP.h:83: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
   83 | #pragma omp parallel for if ((end - begin) >= grain_size)
      |
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp: In function ‘at::Tensor load_textures(at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int)’:
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                                       ^
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
   17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
      |                        ^~~~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:28:5: note: in expansion of macro ‘CHECK_INPUT’
   28 |     CHECK_INPUT(image);
      |     ^~~~~~~~~~~
In file included from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
  303 |   DeprecatedTypeProperties & type() const {
      |                              ^~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:23: error: ‘AT_CHECK’ was not declared in this scope; did you mean ‘DCHECK’?
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                       ^~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:23: note: in definition of macro ‘CHECK_CUDA’
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                       ^~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:28:5: note: in expansion of macro ‘CHECK_INPUT’
   28 |     CHECK_INPUT(image);
      |     ^~~~~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                                       ^
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
   17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
      |                        ^~~~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:29:5: note: in expansion of macro ‘CHECK_INPUT’
   29 |     CHECK_INPUT(faces);
      |     ^~~~~~~~~~~
In file included from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
  303 |   DeprecatedTypeProperties & type() const {
      |                              ^~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                                       ^
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
   17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
      |                        ^~~~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:30:5: note: in expansion of macro ‘CHECK_INPUT’
   30 |     CHECK_INPUT(is_update);
      |     ^~~~~~~~~~~
In file included from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
  303 |   DeprecatedTypeProperties & type() const {
      |                              ^~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
   15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
      |                                       ^
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
   17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
      |                        ^~~~~~~~~~
/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:31:5: note: in expansion of macro ‘CHECK_INPUT’
   31 |     CHECK_INPUT(textures);
      |     ^~~~~~~~~~~
In file included from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                 from /tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
  303 |   DeprecatedTypeProperties & type() const {
      |                              ^~~~
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1667, in _run_ninja_build
    subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

上述异常是导致以下异常的直接原因:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-bhf3anci/neural-renderer-pytorch_8cf9e80a49224bd798a82d088a984e58/setup.py", line 29, in <module>
    setup(
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
    build_ext.build_extensions(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 529, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/danyilzozulia/PycharmProjects/test/venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

我是新的CUDA和pytorch所以你可以帮助,请,解决这个问题.我使用CUDA V10.1,pytorch V1.8.0,putorch3d 0.3.0。

oogrdqng

oogrdqng1#

我在别处找到了答案。该问题是由项目的编译资源与您安装的pytorch版本不兼容引起的。您可以降级您的pytorch版本,或者将源代码中的所有AT_CHECK更改为TORCH_CHECK。后者为我工作。祝你好运!

相关问题