I'm trying to deploy a shiny app which has a python backend on https://www.shinyapps.io.
I'm using reticulate
package to let r communicate with python.
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?