oloBion / Retip

Retip - Retention Time prediction for metabolomics
31 stars 15 forks source link

Error in path.expand(path) : invalid 'path' argument when run fit.keras #15

Closed Le0nT1 closed 2 years ago

Le0nT1 commented 2 years ago

Dear Developer, I am running R 4.0.5 on Windows and keep getting this error when I run the keras <- fit.keras(training,testing) line when I follow the instructions on Win 10. I didn't find useful information online. Someone asked the same question on stackoverflow but nobody answered it. The traceback is pasted below:

Error in path.expand(path) : invalid 'path' argument 16. path.expand(path) 15. normalizePath(conda_envs, mustWork = FALSE) 14. unique(normalizePath(conda_envs, mustWork = FALSE)) 13. conda_list(conda = conda) 12. rbind(deparse.level, ...) 11. rbind(conda_envs, conda_list(conda = conda)) 10. python_conda_versions() 9. py_discover_config(required_module, use_environment) 8. (function() { op <- options(reticulate.python.initializing = TRUE) on.exit(options(op), add = TRUE) py_discover_config(required_module, use_environment) ... 7. initialize_python(required_module, use_environment) 6. ensure_python_initialized() 5. tuple(shape) 4. modifiers[nm] 3. capture_args(match.call(), list(shape = normalize_shape, batch_shape = normalize_shape)) 2. layer_input(shape = ncol(train_data)) at model_keras.R#48 1. fit.keras(training, testing)

Le0nT1 commented 2 years ago

Nvm. I think it's a conflicts issue if the user has conda/anaconda with python and/or keras installed on their windows machine. I have solved it by uninstall python and conda. However, I met a new problem saying that "Error in py_call_impl(callable, dots$args, dots$keywords) : ModuleNotFoundError: No module named 'rpytools'"

tobigithub commented 2 years ago

@Le0nT1 this seems to be a common error, see here https://github.com/rstudio/keras/issues/561 and here https://github.com/rstudio/keras/issues/346 see also https://www.google.com/search?q=No+module+named+%27rpytools%27%22+keras