Errors loading {torch} on Windows 10

Hi, I'm just wondering if other Windows users are having any issues installing/loading the awesome new torch :package:. I've tried install.packages("torch") and remotes::install_github("mlverse/torch"). Both seem to work fine, but when I run library(torch), I get this:

# trying URL 'https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.5.0.zip'
# Content type 'application/zip' length 99725651 bytes (95.1 MB)
# downloaded 95.1 MB

# trying URL 'https://storage.googleapis.com/torch-lantern-builds/refs/heads/master/latest/Windows-cpu.zip'
# Content type 'application/zip' length 1436082 bytes (1.4 MB)
# downloaded 1.4 MB

# Warning message:
# Failed to install Torch, manually run install_torch(). C:\Users\ethan\Documents\R\win-library\4.0\torch\deps\lantern.dll - The specified module could not be found.

So then I run install_torch() and get this:

# Error in cpp_lantern_init(normalizePath(install_path())) : 
#   C:\Users\ethan\Documents\R\win-library\4.0\torch\deps\lantern.dll - The specified module could not be found.

But if I go to that path, it's definitely there:

image

Any help is greatly appreciated, I'm really not sure where to go from here. :slightly_smiling_face:

1 Like

Hi @EeethB

Thanks for trying torch! Can you try the solution proposed in this issue?

Hi, that seems to have worked! At least, I can now load torch. Thanks :smile_cat:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.