EeethB
September 29, 2020, 2:57pm
1
Hi, I'm just wondering if other Windows users are having any issues installing/loading the awesome new torch
. 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:
Any help is greatly appreciated, I'm really not sure where to go from here.
1 Like
dfalbel
September 29, 2020, 3:25pm
2
Hi @EeethB
Thanks for trying torch! Can you try the solution proposed in this issue?
opened 07:03AM - 17 Sep 20 UTC
closed 12:34PM - 19 Sep 20 UTC
Hi @dfalbel & collaborators,
Thank you for bringing "torch" interface to R, … enabling R to have better deep learning capabilities! I was keen to try out all examples in pkgdown website, but when I install "torch", I encounter the following issue, *C:\Users\User\Documents\R\R-4.0.2\library\torch\deps\lantern.dll - The specified module could not be found*:
``` r
remotes::install_github("mlverse/torch")
#> Downloading GitHub repo mlverse/torch@HEAD
#> Running `R CMD build`...
#> * checking for file 'C:\Users\User\AppData\Local\Temp\RtmpwHIpeq\remotes11645e5530e6\mlverse-torch-52ded08/DESCRIPTION' ... OK
#> * preparing 'torch':
#> * checking DESCRIPTION meta-information ... OK
#> * cleaning src
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> Removed empty directory 'torch/bench'
#> Removed empty directory 'torch/docker'
#> * building 'torch_0.0.2.9000.tar.gz'
library(torch)
#> 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\User\Documents\R\R-4.0.2\library\torch\deps\lantern.dll - The specified module could not be found.
torch::install_torch()
#> Warning: Torch failed to start, restart your R session to try again. C:\Users\User\Documents\R\R-4.0.2\library\torch\deps\lantern.dll - The specified module could not be found.
#> Error in cpp_lantern_init(normalizePath(install_path())): C:\Users\User\Documents\R\R-4.0.2\library\torch\deps\lantern.dll - The specified module could not be found.
```
<sup>Created on 2020-09-17 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup>
But when I check for existence of "lantern.dll", it did exist:
``` r
file.exists("C:\\Users\\User\\Documents\\R\\R-4.0.2\\library\\torch\\deps\\lantern.dll")
#> [1] TRUE
```
<sup>Created on 2020-09-17 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup>
Could you advice how should I proceed? The following is my sessionInfo:
``` r
sessionInfo()
#> R version 4.0.2 (2020-06-22)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 18363)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=English_Malaysia.1252 LC_CTYPE=English_Malaysia.1252
#> [3] LC_MONETARY=English_Malaysia.1252 LC_NUMERIC=C
#> [5] LC_TIME=English_Malaysia.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] torch_0.0.2.9000
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.5 ps_1.3.4 digest_0.6.25 R6_2.4.1 magrittr_1.5
#> [6] reprex_0.3.0 evaluate_0.14 rlang_0.4.7 remotes_2.2.0 fs_1.5.0
#> [11] callr_3.4.4 whisker_0.4 rmarkdown_2.3 tools_4.0.2 bit64_4.0.5
#> [16] bit_4.0.4 tinytex_0.25 xfun_0.16 compiler_4.0.2 processx_3.4.4
#> [21] clipr_0.7.0 htmltools_0.5.0 knitr_1.29
```
<sup>Created on 2020-09-17 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup>
EeethB
September 29, 2020, 3:41pm
3
Hi, that seems to have worked! At least, I can now load torch
. Thanks
1 Like
system
Closed
October 6, 2020, 3:41pm
4
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.