CogBrainHealthLab / VertexWiseR

VertexWiseR R package : a suite of tools to extract, manipulate, analyze, and visualize cortical surface and hippocampal vertex-wise data
GNU General Public License v3.0
0 stars 2 forks source link

ImportError: DLL load failed while importing vtkIONetCDF: The specified procedure could not be found. #6

Closed y-Taka03 closed 1 day ago

y-Taka03 commented 3 days ago

Hi,

I am currently working through the VertexWiseR tutorial and have encountered persistent VTK-related errors that I have been unable to resolve. I am reaching out for assistance in troubleshooting this issue.

SPRENG_CTv_smoothed = smooth_surf(SPRENG_CTv, 10)
Checking for VertexWiseR system requirements ...
Checking for Miniconda or Python environment...
Checking Numpy's version...
Checking for BrainStat package...
Checking BrainStat's analysis data...
No system requirements are missing. ✓

Error in py_module_import(module, convert = convert) :
  ImportError: DLL load failed while importing vtkIONetCDF: The specified procedure could not be found.
Run `reticulate::py_last_error()` for details.ImportError: DLL load failed while importing vtkIONetCDF: The specified procedure could not be found.

Here is my session info.

> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22635)

Matrix products: default

locale:
[1] LC_COLLATE=Japanese_Japan.utf8  LC_CTYPE=Japanese_Japan.utf8    LC_MONETARY=Japanese_Japan.utf8 LC_NUMERIC=C                   
[5] LC_TIME=Japanese_Japan.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] VertexWiseR_1.1.0

loaded via a namespace (and not attached):
 [1] reticulate_1.36.1        tidyselect_1.2.0         pkgfilecache_0.1.5       purrr_1.0.0              lattice_0.20-45         
 [6] splines_4.2.2            colorspace_2.0-3         vctrs_0.5.1              generics_0.1.3           doSNOW_1.0.20           
[11] htmltools_0.5.8.1        snow_0.4-4               viridisLite_0.4.2        base64enc_0.1-3          utf8_1.2.2              
[16] plotly_4.10.2            rlang_1.0.6              R.oo_1.25.0              pillar_1.9.0             withr_2.5.2             
[21] glue_1.6.2               DBI_1.1.3                R.utils_2.12.2           rappdirs_0.3.3           RColorBrewer_1.1-3      
[26] foreach_1.5.2            lifecycle_1.0.3          stringr_1.5.0            munsell_0.5.0            gtable_0.3.1            
[31] RNifti_1.4.5             R.methodsS3_1.8.2        htmlwidgets_1.6.0        codetools_0.2-18         fastmap_1.1.1           
[36] doParallel_1.0.17        parallel_4.2.2           gifti_0.8.0              fansi_1.0.3              Rcpp_1.0.9              
[41] scales_1.3.0             ciftiTools_0.14.0        jsonlite_1.8.4           abind_1.4-5              fs_1.5.2                
[46] png_0.1-8                ggplot2_3.4.0            digest_0.6.31            stringi_1.7.8            dplyr_1.0.10            
[51] rprojroot_2.0.3          grid_4.2.2               here_1.0.1               cli_3.5.0                tools_4.2.2             
[56] bitops_1.0-7             magrittr_2.0.3           lazyeval_0.2.2           tibble_3.1.8             tidyr_1.2.1             
[61] pkgconfig_2.0.3          Matrix_1.5-1             data.table_1.14.6        xml2_1.3.3               oro.nifti_0.11.4        
[66] freesurferformats_0.1.18 assertthat_0.2.1         httr_1.4.4               rstudioapi_0.14          iterators_1.0.14        
[71] R6_2.5.1                 igraph_1.3.5             compiler_4.2.2

Thank you very much in advance!

Taka

CogBrainHealthLab commented 3 days ago

it seems the most recently released vtk 9.4.0 python package is causing the problem. We will fix this in the next CRAN release. In the meantime, you can simply install an older version of VTK with

reticulate::py_install("vtk==9.3.1",pip = T)

and then restart R/RStudio

y-Taka03 commented 3 days ago

I performed it correctly after installing VTK 9.3.1. The issue was resolved. Thank you very much!