R/find_python_library.R

Defines functions find_python_library

find_python_library <- function(python){
    pylib <- system(paste(python,"-c 'import sys; print(sys.path)'"),
                    intern = TRUE)
    pylib  <- trimws(gsub("\\[|\\]|'","",strsplit(pylib,",")[[1]]))
    pylib <- pylib[stringr::str_length(pylib)>0]
    return(pylib)
}
RajLabMSSM/echoconda documentation built on June 6, 2024, 10:38 a.m.