Recently I have been trying to deploy in shinyapps.io a Shiny app with Keras an Tensorflow. My environment landscape was really a mess so I decided to reinstall everything (Anaconda, Python, R, Rstudio).
This example, if I am not wrong, should work whether you run it locally or you deploy it in shinyapps.io. Without changing anything in the example, I get this error message printed in the console. When I try to run an app with Keras, without all this virtual env setups I don't have any issue.
Warning in system2(python, args, stdout = TRUE, stderr = FALSE) : running command '"python3" -E -c "import platform; print(platform.python_version())"' had status 9009 Warning: Error in if: argument is of length zero 49: virtualenv_module 48: reticulate::virtualenv_create 47: server [C:\Users\user\Documents\1.R_projects\shiny-reticulate-app-master/server.R#18] Error in if (py_version >= "3.6") modules <- c("venv", modules) : argument is of length zero```