Rust package error with torch sys 0.13 already installed libtorch

└─$ cargo build
   Compiling torch-sys v0.13.0
error: failed to run custom build command for `torch-sys v0.13.0`

Caused by:
process didn't exit successfully: /home/bored/rust/bert/target/debug/build/torch-sys-486e4d510f9cceb4/build-script-build (exit status: 1)
--- stdout

--- stderr
Cannot find a libtorch install, you can either:

  • Install libtorch manually and set the LIBTORCH environment variable to appropriate path.
  • Use a system wide install in /usr/lib/
  • Use a Python environment with PyTorch installed by setting LIBTORCH_USE_PYTORCH=1

See the readme for more details:

What have you done to install libtorch? Have you followed the instructions listed in the README linked in the error message?

I installed it the same way it was specified in the README file and also set the LIBTORCH path variable as specified it doesnt seem to work

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.