facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable" fails #1020

Closed Yxs-160 closed 2 years ago

Yxs-160 commented 2 years ago

🐛 Bugs / Unexpected behaviors

I am trying to install the released version with $ pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' but it fails with the following output:

$ pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"
Collecting git+https://github.com/facebookresearch/pytorch3d.git@stable
  Cloning https://github.com/facebookresearch/pytorch3d.git (to revision stable) to /tmp/pip-req-build-sfhs9omc
  Running command git clone -q https://github.com/facebookresearch/pytorch3d.git /tmp/pip-req-build-sfhs9omc
  Running command git checkout -q 3fc3ea507bfbf7e1c2d5023a6db202698206f91d
  Resolved https://github.com/facebookresearch/pytorch3d.git to commit 3fc3ea507bfbf7e1c2d5023a6db202698206f91d
Requirement already satisfied: fvcore in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from pytorch3d==0.6.1) (0.1.5.post20211023)
Requirement already satisfied: iopath in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from pytorch3d==0.6.1) (0.1.9)
Requirement already satisfied: tabulate in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (0.8.9)
Requirement already satisfied: termcolor>=1.1 in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (1.1.0)
Requirement already satisfied: tqdm in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (4.62.3)
Requirement already satisfied: numpy in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (1.19.5)
Requirement already satisfied: yacs>=0.1.6 in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (0.1.8)
Requirement already satisfied: dataclasses in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (0.8)
Requirement already satisfied: Pillow in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (8.4.0)
Requirement already satisfied: pyyaml>=5.1 in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from fvcore->pytorch3d==0.6.1) (6.0)
Requirement already satisfied: portalocker in /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages (from iopath->pytorch3d==0.6.1) (2.3.2)
Building wheels for collected packages: pytorch3d
  Building wheel for pytorch3d (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ubuntu/anaconda3/envs/MeshSDF/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dwogyrlc
       cwd: /tmp/pip-req-build-sfhs9omc/
  Complete output (190 lines):
  running bdist_wheel
  /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/utils/cpp_extension.py:369: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
    warnings.warn(msg.format('we could not find ninja.'))
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/pytorch3d
  copying pytorch3d/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d
  creating build/lib.linux-x86_64-3.6/pytorch3d/utils
  copying pytorch3d/utils/camera_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
  copying pytorch3d/utils/ico_sphere.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
  copying pytorch3d/utils/torus.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
  copying pytorch3d/utils/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
  creating build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/mesh_normal_consistency.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/mesh_edge_loss.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/point_mesh_distance.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/mesh_laplacian_smoothing.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  copying pytorch3d/loss/chamfer.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
  creating build/lib.linux-x86_64-3.6/pytorch3d/datasets
  copying pytorch3d/datasets/shapenet_base.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
  copying pytorch3d/datasets/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
  copying pytorch3d/datasets/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
  creating build/lib.linux-x86_64-3.6/pytorch3d/common
  copying pytorch3d/common/types.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
  copying pytorch3d/common/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
  copying pytorch3d/common/compat.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
  creating build/lib.linux-x86_64-3.6/pytorch3d/structures
  copying pytorch3d/structures/volumes.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
  copying pytorch3d/structures/pointclouds.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
  copying pytorch3d/structures/meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
  copying pytorch3d/structures/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
  copying pytorch3d/structures/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
  creating build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/camera_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/blending.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/camera_utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/cameras.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/materials.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/compositing.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  copying pytorch3d/renderer/lighting.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
  creating build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/experimental_gltf_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/pluggable.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/obj_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/ply_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/off_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/mtl_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  copying pytorch3d/io/pluggable_formats.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
  creating build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/se3.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/rotation_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/transform3d.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/so3.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/math.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  copying pytorch3d/transforms/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
  creating build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/cubify.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/interp_face_attrs.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/vert_align.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/subdivide_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/sample_points_from_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/knn.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/points_normals.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/marching_cubes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/sample_farthest_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/graph_conv.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/laplacian_matrices.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/ball_query.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/marching_cubes_data.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/mesh_face_areas_normals.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/perspective_n_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/mesh_filtering.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/points_alignment.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/packed_to_padded.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/cameras_alignment.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/iou_box3d.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/points_to_volumes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  copying pytorch3d/ops/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
  creating build/lib.linux-x86_64-3.6/pytorch3d/vis
  copying pytorch3d/vis/texture_vis.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
  copying pytorch3d/vis/plotly_vis.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
  copying pytorch3d/vis/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
  creating build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
  copying pytorch3d/datasets/r2n2/r2n2.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
  copying pytorch3d/datasets/r2n2/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
  copying pytorch3d/datasets/r2n2/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
  creating build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
  copying pytorch3d/datasets/shapenet/shapenet_core.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
  copying pytorch3d/datasets/shapenet/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
  creating build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
  copying pytorch3d/common/workaround/symeig3x3.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
  copying pytorch3d/common/workaround/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
  copying pytorch3d/common/workaround/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
  creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  copying pytorch3d/renderer/points/rasterizer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  copying pytorch3d/renderer/points/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  copying pytorch3d/renderer/points/rasterize_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  copying pytorch3d/renderer/points/compositor.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  copying pytorch3d/renderer/points/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
  creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/raysampling.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/sample_pdf.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  copying pytorch3d/renderer/implicit/raymarching.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
  creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/textures.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/rasterizer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/shader.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/clip.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/rasterize_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/shading.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  copying pytorch3d/renderer/mesh/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
  creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
  copying pytorch3d/renderer/points/pulsar/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
  copying pytorch3d/renderer/points/pulsar/unified.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
  copying pytorch3d/renderer/points/pulsar/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
  copying pytorch3d/datasets/r2n2/r2n2_synset_dict.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
  copying pytorch3d/datasets/shapenet/shapenet_synset_dict_v1.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
  copying pytorch3d/datasets/shapenet/shapenet_synset_dict_v2.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
  running build_ext
  building 'pytorch3d._C' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/tmp
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/sample_pdf
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ball_query
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/pytorch
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/host
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/mesh_normal_consistency
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_points
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/point_mesh
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/gather_scatter
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/compositing
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/sample_farthest_points
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/points_to_volumes
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/packed_to_padded_tensor
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/iou_box3d
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/blending
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/knn
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_meshes
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/face_areas_normals
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/cuda
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_coarse
  creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/interp_face_attrs
  gcc -pthread -B /home/ubuntu/anaconda3/envs/MeshSDF/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -DTHRUST_IGNORE_CUB_VERSION_CHECK -I/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc -I/home/ubuntu/MeshSDF-main/cub-1.10.0 -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/THC -I:/usr/local/cuda/include -I/home/ubuntu/anaconda3/envs/MeshSDF/include/python3.6m -c /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp -o build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
  /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:46: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
     46 | #pragma clang diagnostic push
        |
  /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:47: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
     47 | #pragma clang diagnostic ignored "-Weverything"
        |
  In file included from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:140,
                   from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                   from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                   from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                   from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
                   from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                   from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:48,
                   from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
  /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/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)
        |
  In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
  /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:49: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
     49 | #pragma clang diagnostic pop
        |
  In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:51,
                   from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
  /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: No such file or directory
      5 | #include <cuda_runtime_api.h>
        |          ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pytorch3d
  Running setup.py clean for pytorch3d
Failed to build pytorch3d
Installing collected packages: pytorch3d
    Running setup.py install for pytorch3d ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ubuntu/anaconda3/envs/MeshSDF/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-0dcwgoi8/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/MeshSDF/include/python3.6m/pytorch3d
         cwd: /tmp/pip-req-build-sfhs9omc/
    Complete output (190 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pytorch3d
    copying pytorch3d/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d
    creating build/lib.linux-x86_64-3.6/pytorch3d/utils
    copying pytorch3d/utils/camera_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
    copying pytorch3d/utils/ico_sphere.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
    copying pytorch3d/utils/torus.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
    copying pytorch3d/utils/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/utils
    creating build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/mesh_normal_consistency.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/mesh_edge_loss.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/point_mesh_distance.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/mesh_laplacian_smoothing.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    copying pytorch3d/loss/chamfer.py -> build/lib.linux-x86_64-3.6/pytorch3d/loss
    creating build/lib.linux-x86_64-3.6/pytorch3d/datasets
    copying pytorch3d/datasets/shapenet_base.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
    copying pytorch3d/datasets/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
    copying pytorch3d/datasets/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets
    creating build/lib.linux-x86_64-3.6/pytorch3d/common
    copying pytorch3d/common/types.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
    copying pytorch3d/common/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
    copying pytorch3d/common/compat.py -> build/lib.linux-x86_64-3.6/pytorch3d/common
    creating build/lib.linux-x86_64-3.6/pytorch3d/structures
    copying pytorch3d/structures/volumes.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
    copying pytorch3d/structures/pointclouds.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
    copying pytorch3d/structures/meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
    copying pytorch3d/structures/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
    copying pytorch3d/structures/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/structures
    creating build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/camera_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/blending.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/camera_utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/cameras.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/materials.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/compositing.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    copying pytorch3d/renderer/lighting.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer
    creating build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/experimental_gltf_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/pluggable.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/obj_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/ply_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/off_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/mtl_io.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    copying pytorch3d/io/pluggable_formats.py -> build/lib.linux-x86_64-3.6/pytorch3d/io
    creating build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/se3.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/rotation_conversions.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/transform3d.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/so3.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/math.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    copying pytorch3d/transforms/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/transforms
    creating build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/cubify.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/interp_face_attrs.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/vert_align.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/subdivide_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/sample_points_from_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/knn.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/points_normals.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/marching_cubes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/sample_farthest_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/graph_conv.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/laplacian_matrices.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/ball_query.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/marching_cubes_data.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/mesh_face_areas_normals.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/perspective_n_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/mesh_filtering.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/points_alignment.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/packed_to_padded.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/cameras_alignment.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/iou_box3d.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/points_to_volumes.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    copying pytorch3d/ops/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/ops
    creating build/lib.linux-x86_64-3.6/pytorch3d/vis
    copying pytorch3d/vis/texture_vis.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
    copying pytorch3d/vis/plotly_vis.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
    copying pytorch3d/vis/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/vis
    creating build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
    copying pytorch3d/datasets/r2n2/r2n2.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
    copying pytorch3d/datasets/r2n2/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
    copying pytorch3d/datasets/r2n2/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
    creating build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
    copying pytorch3d/datasets/shapenet/shapenet_core.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
    copying pytorch3d/datasets/shapenet/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
    creating build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
    copying pytorch3d/common/workaround/symeig3x3.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
    copying pytorch3d/common/workaround/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
    copying pytorch3d/common/workaround/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/common/workaround
    creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    copying pytorch3d/renderer/points/rasterizer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    copying pytorch3d/renderer/points/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    copying pytorch3d/renderer/points/rasterize_points.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    copying pytorch3d/renderer/points/compositor.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    copying pytorch3d/renderer/points/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points
    creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/raysampling.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/sample_pdf.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    copying pytorch3d/renderer/implicit/raymarching.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/implicit
    creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/textures.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/rasterizer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/shader.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/clip.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/rasterize_meshes.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/utils.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/shading.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    copying pytorch3d/renderer/mesh/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/mesh
    creating build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
    copying pytorch3d/renderer/points/pulsar/renderer.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
    copying pytorch3d/renderer/points/pulsar/unified.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
    copying pytorch3d/renderer/points/pulsar/__init__.py -> build/lib.linux-x86_64-3.6/pytorch3d/renderer/points/pulsar
    copying pytorch3d/datasets/r2n2/r2n2_synset_dict.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/r2n2
    copying pytorch3d/datasets/shapenet/shapenet_synset_dict_v1.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
    copying pytorch3d/datasets/shapenet/shapenet_synset_dict_v2.json -> build/lib.linux-x86_64-3.6/pytorch3d/datasets/shapenet
    running build_ext
    /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/utils/cpp_extension.py:369: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    building 'pytorch3d._C' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/tmp
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/sample_pdf
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ball_query
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/pytorch
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/host
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/mesh_normal_consistency
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_points
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/point_mesh
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/gather_scatter
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/compositing
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/sample_farthest_points
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/points_to_volumes
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/packed_to_padded_tensor
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/iou_box3d
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/blending
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/knn
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_meshes
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/face_areas_normals
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/pulsar/cuda
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/rasterize_coarse
    creating build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/interp_face_attrs
    gcc -pthread -B /home/ubuntu/anaconda3/envs/MeshSDF/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -DTHRUST_IGNORE_CUB_VERSION_CHECK -I/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc -I/home/ubuntu/MeshSDF-main/cub-1.10.0 -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/THC -I:/usr/local/cuda/include -I/home/ubuntu/anaconda3/envs/MeshSDF/include/python3.6m -c /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp -o build/temp.linux-x86_64-3.6/tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
    /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:46: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       46 | #pragma clang diagnostic push
          |
    /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:47: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       47 | #pragma clang diagnostic ignored "-Weverything"
          |
    In file included from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:140,
                     from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                     from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                     from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                     from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
                     from /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                     from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:48,
                     from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
    /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/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)
          |
    In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
    /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:49: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       49 | #pragma clang diagnostic pop
          |
    In file included from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/./pulsar/global.h:51,
                     from /tmp/pip-req-build-sfhs9omc/pytorch3d/csrc/ext.cpp:10:
    /home/ubuntu/anaconda3/envs/MeshSDF/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: No such file or directory
        5 | #include <cuda_runtime_api.h>
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/anaconda3/envs/MeshSDF/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-sfhs9omc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-0dcwgoi8/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/MeshSDF/include/python3.6m/pytorch3d Check the logs for full command output.

My gcc and nvcc is

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Tue_Sep_15_19:10:02_PDT_2020
Cuda compilation tools, release 11.1, V11.1.74
Build cuda_11.1.TC455_06.29069683_0

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
bottler commented 2 years ago

Perhaps the CUDA_HOME environment variable is not set to the right place? Can you check what it is and what it should be.

Yxs-160 commented 2 years ago

Perhaps the CUDA_HOME environment variable is not set to the right place? Can you check what it is and what it should be.

Thank you for your reply. its useful for me

zeakey commented 2 years ago

@bottler Is CUB required using this installation method ? I'm struggling with building CUB (thrust) on my machine.

bottler commented 2 years ago

@zeakey Maybe best to ask in a new issue. CUB is needed when building PyTorch3D with CUDA support from source. But CUB is a header-only library so you do not build CUB. You just download it, extract it, and set CUB_HOME. (And CUB_HOME and CUDA_HOME are different things.)