Possibly misleading error message for importing umap
Function runUMAP in utilities.R throws the error message "Cannot find UMAP, please install through pip (e.g. pip install umap-learn or reticulate::py_install(packages = 'umap-learn'))." if python module umap fail to load , while there exists other conditions causing program to fail passing reticulate::py_module_available.
runUMAP <- function(
# params ...
){
if (!reticulate::py_module_available(module = 'umap')) {
stop("Cannot find UMAP, please install through pip (e.g. pip install umap-learn or reticulate::py_install(packages = 'umap-learn')).")
}
# code ...
}
For an example, umap module could fail to load due to an outdated gcc version, showing
Error in py_module_import(module, convert = convert) :
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/oakento/.local/miniconda3/envs/r-reticulate/lib/python3.6/site-packages/scipy/_lib/_uarray/_uarray.cpython-36m-x86_64-linux-gnu.so)
function runUMAP throws an "module not found error" msg still that do not describe the actual error.
@Oakento Thanks for the information. So there is no error after you updating the gcc?
Hi @sqjin . It hasn't been updated yet, for it needs sudo privileges.
The ImportError occurred while importing umap in R is another story that it seems to be reticulate's limitation dealing with conda environments. Intending to use libstdc++.so.6 in conda lib instead of system lib, I've tried setting reticulate::use_condaenv to r-reticulate and LD_LIBRARY_PATH to the target library but it didn't take effect. Still working on it.
Any update on this end! Getting the same error.