Skip to content

Compilation error during adaptive_gridsampler installation #25

@Subarasheese

Description

@Subarasheese

Hello,

I am trying to build and run the CAR-pytorch project on my Arch Linux machine, but I am encountering compilation errors during the installation of the adaptive_gridsampler.

Here are the steps I have followed:

  1. Cloned the repository and navigated to the CAR directory.
  2. Entered the adaptive_gridsampler directory and attempted to run python3 setup.py build_ext --inplace.

Initially, I encountered an error related to an incompatible version of PyTorch. The project requires PyTorch 1.3.1, but it is not available through pip or conda for Python 3.8. I tried installing PyTorch 1.4.0, but the error persisted. I then created a conda environment with Python 3.7 and installed PyTorch 1.3.1, but the compilation error still occurred.

Here is the error message I received:

/home/myuser/.conda/envs/car-env/lib/python3.7/site-packages/torch/include/pybind11/cast.h: In function ‘typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type>::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)’:
/home/myuser/.conda/envs/car-env/lib/python3.7/site-packages/torch/include/pybind11/cast.h:914:120: error: expected template-name before ‘<’ token
  914 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
      |                                                                                                                        ^
/home/myuser/.conda/envs/car-env/lib/python3.7/site-packages/torch/include/pybind11/cast.h:914:120: error: expected identifier before ‘<’ token
/home/myuser/.conda/envs/car-env/lib/python3.7/site-packages/torch/include/pybind11/cast.h:914:123: error: expected primary-expression before ‘>’ token
  914 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
      |                                                                                                                           ^
/home/myuser/.conda/envs/car-env/lib/python3.7/site-packages/torch/include/pybind11/cast.h:914:126: error: expected primary-expression before ‘)’ token
  914 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
      |                                                                                                                              ^
error: command '/opt/cuda/bin/nvcc' failed with exit code 1

I would appreciate any guidance or assistance in resolving this issue. If there are any updates or additional steps required for compatibility with the latest versions of the dependencies, please let me know.

Thank you in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions