0

I'm trying to deploy a app which has a backend on https://www.shinyapps.io. I'm using reticulate package to let communicate with . Locally everything is fine.

To deploy I'm following this: https://github.com/ranikay/shiny-reticulate-app I wrote a couple of lines of code at the beginning of global.R

if (!Sys.info()[['user']] == 'myuser'){
  # When running on shinyapps.io, create a virtualenv 
  envs<-reticulate::virtualenv_list()
  if(!'venv_shiny_app' %in% envs)
  {
  reticulate::virtualenv_create(envname = 'venv_shiny_app', 
                                 python = '/usr/bin/python3')
  reticulate::virtualenv_install('venv_shiny_app', 
                                 packages = c('numpy',
                                              'python-xbrl',
                                              'pandas',
                                              'loguru',
                                              'xmltodict',
                                              'xlsxwriter',
                                              'bs4'))
  }
}

aiming at creating virtual environments and installing packages. When trying to deploy I get this issue:

Paths should be to files within proj directory : Line 30.

Line 30 is :

 reticulate::virtualenv_create(envname = 'venv_shiny_app', 
                                 python = '/usr/bin/python3')

I'm quite confused. Can anyone please help me in debugging this?

micstr
  • 5,080
  • 8
  • 48
  • 76
Marco Fumagalli
  • 2,307
  • 3
  • 23
  • 41

0 Answers0