Environment:
- torch version: 0.17.0
- OS: Windows 10/11
- CUDA build: cu128 (also reproduced with cu129 before switching)
- R: 4.6.1
Problem:
install_torch() completes successfully every time — both LibTorch (~3.2GB)
and Lantern (~2.3MB) download to their exact reported byte sizes, with no
warnings. But library(torch) / torch::cuda_is_available() then fails with:
Error: Lantern is not loaded. Please use install_torch() to install
additional dependencies.
Caused by error in system.file(): ! no file found
What I've ruled out:
- Confirmed lantern.dll, torch.dll, torch_cuda.dll, and all CUDA/cuDNN DLLs
ARE physically present in .../win-library/4.6/torch/lib/ (verified via
File Explorer screenshot)
- .libPaths() correctly includes the folder where these files live
- Not an antivirus/quarantine issue (Windows Defender Protection History
empty; exclusions added for the install folder regardless)
- Not a path-length issue (tested with TORCH_HOME set to a short path,
C:/torchlib — same error)
- Not RStudio-specific (identical error in plain RGui, outside RStudio)
- Not a stale/corrupted previous install (identical error after
remove.packages() + manual folder deletion + fresh install)
- Not a download/network issue (both files match exact reported byte size
every time, multiple independent attempts)
- Tried creating a "deps" subfolder (matching an older, possibly outdated
internal path convention) as a copy of "lib" — no change
- rlang::last_trace() reports no error was recorded; options(error =
traceback) also produces no additional stack trace — the error appears
to be caught and re-messaged internally before reaching R's standard
error-reporting mechanisms, so I can't get further diagnostic detail
from the R session itself.
Happy to provide any additional diagnostics on request — just not sure
what else to check from the outside at this point.
Environment:
Problem:
install_torch()completes successfully every time — both LibTorch (~3.2GB)and Lantern (~2.3MB) download to their exact reported byte sizes, with no
warnings. But
library(torch)/torch::cuda_is_available()then fails with:Error: Lantern is not loaded. Please use
install_torch()to installadditional dependencies.
Caused by error in
system.file(): ! no file foundWhat I've ruled out:
ARE physically present in .../win-library/4.6/torch/lib/ (verified via
File Explorer screenshot)
empty; exclusions added for the install folder regardless)
C:/torchlib — same error)
remove.packages() + manual folder deletion + fresh install)
every time, multiple independent attempts)
internal path convention) as a copy of "lib" — no change
traceback) also produces no additional stack trace — the error appears
to be caught and re-messaged internally before reaching R's standard
error-reporting mechanisms, so I can't get further diagnostic detail
from the R session itself.
Happy to provide any additional diagnostics on request — just not sure
what else to check from the outside at this point.