Shiny app with python aborts when deploying

Hello,
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).

To set a shiny app in shinyapps.io I decided to grab an example of a shinyapp with python that is sometimes recommended: https://github.com/ranikay/shiny-reticulate-app.

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```
1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.