marius-team / marius

Large scale graph learning on a single machine.
https://marius-project.org
Apache License 2.0
160 stars 45 forks source link

Installation error with 'C++17 or later compatible compiler is required' #149

Open ZHANGWENTAI opened 10 months ago

ZHANGWENTAI commented 10 months ago

Describe the bug report bug while installing marius by pip3 install .

To Reproduce Steps to reproduce the behavior: git clone https://github.com/marius-team/marius.git cd marius pip3 install . report the bug:

/tmp/pip-build-env-w3j3rbae/overlay/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~
...

/tmp/pip-build-env-w3j3rbae/overlay/lib/python3.9/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch
         27 | #error You need C++17 to compile PyTorch
            |  ^~~~~
...

subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'bindings', '--config', 'Release', '--', '-j80']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for marius
Failed to build marius

Environment Executed on Ubuntu system, all the dependencies satisfy the requirement.

Additional context Add any other context about the problem here.

yichuan520030910320 commented 5 months ago

you can add 'add_compile_options(-std=c++17) ' in your cmakelist