ashawkey / cubvh

CUDA Mesh BVH tools.
MIT License
156 stars 11 forks source link

Failed to install - eigen/matrix.h: No such file or directory #11

Open vitalii-p opened 9 months ago

vitalii-p commented 9 months ago

I've got an error when tried to build locally, via pip install .

In file included from /home/ubuntu/projects/cubvh/src/bindings.cpp:3:
      /home/ubuntu/projects/venv/lib/python3.10/site-packages/torch/include/pybind11/eigen.h:12:10: fatal error: eigen/matrix.h: No such file or directory
         12 | #include "eigen/matrix.h"
            |          ^~~~~~~~~~~~~~~~
      compilation terminated.

Eigen3 is installed,

$ pkg-config --modversion eigen3
3.4.0
weixiu00 commented 9 months ago

same error. solved by uninstall torch and reinstall torch through conda

ashawkey commented 9 months ago

It seems this problem still preserves for torch 2.1.1... A temporary fix for this is to manually copy the missing eigen folder from pybind to pytorch, for example:

# change the path according to your env !!!
cp -r ~/anaconda3/lib/python3.9/site-packages/pybind11/include/pybind11/eigen ~/anaconda3/lib/python3.9/site-packages/torch/include/pybind11/