Libtorch <torch/torch.h> not found

error.

I’m working on rust bert module for personal application. I had read documentation and try how to configure libtorch in your machine. crates/rust-bert.
Then a execute cargo run.
So I searched over internet and I found few solutions . One is to generated cmake files in your libtorch and recompile.

libtorch after adding cmake . Still error persist . Kindly help me to resolve the error as soon as possible. Snapshots are shared

Be sure to include 2 directories in your include path.
Those paths depend on where you downloaded Libtorch.
For me, I downloaded the pytorch sources into “PytonSources”, so the paths I include are:

~/PythonSources/pytorch/torch/include
~/PythonSources/pytorch/torch/include/torch/csrc/api/include