I try to install the R-Version of pytorch CPU, to avoid using reticulate as a workaround.
I simply used install.packages("torch") which successfully finished.
When using library(torch) after that, it states that there must be two additional system dependencies installed, e.g. libtorch and liblantern
So running install_torch() manually downloads both dependencies as zip files. However, then the following error occurs:
That's a weird issue, I couldn't reproduce. I think this might be an error caused by some problem when downloading the additional dependencies. Does the same error repeat if you simply re-install the package? Ie, running install.packages("torch") again?
Unfornately, yes That being sad, running the code you shared runs through, but as I said whenever I call library(torch), posit states that there are missing dependencies., i.e. libtorch and liblantern. I also tried to download the zip-files manually and provide posit with the path to the files - same error. Strangely, in the /torch/lib folder, there is an liblantern.so