-->

rPython package fails to install on R Shiny shinya

2019-02-18 23:39发布

问题:

Do the shinyapps.io servers not have python installed? Because the package rPython fails to install and it needs python installed. I find it odd if the answer is no because RStudio itself has python support.

Will the shinyapps.io servers ever have python support or is there a workaround? I'd like my published shiny app to call a python script.

Below the installation of rPython on shinyapps.io fails even though it installed and ran fine when done locally (I have python installed obviously).

 rsconnect::showLogs("/home/cornelis/Documents/R Shiny/BrainImageAnalyzer")
    2015-09-28T19:32:32.126565+00:00 shinyapps[61711]:     find, fix
    2015-09-28T19:32:32.126567+00:00 shinyapps[61711]:
    2015-09-28T19:32:32.131509+00:00 shinyapps[61711]:
    2015-09-28T19:32:32.131506+00:00 shinyapps[61711]:
    2015-09-28T19:32:32.131507+00:00 shinyapps[61711]:     sum
    2015-09-28T19:32:34.974927+00:00 shinyapps[61711]: Note: the specification for S3 class “AsIs” in package ‘jsonlite’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class.
    2015-09-28T19:32:35.010367+00:00 shinyapps[61711]: Installing package into ‘/usr/local/lib/R/site-library’
    2015-09-28T19:32:35.010369+00:00 shinyapps[61711]: (as ‘lib’ is unspecified)
    2015-09-28T19:32:35.011193+00:00 shinyapps[61711]: Warning in install.packages("rPython") :
    2015-09-28T19:32:35.011195+00:00 shinyapps[61711]:   'lib = "/usr/local/lib/R/site-library"' is not writable
    2015-09-28T19:32:35.012074+00:00 shinyapps[61711]: Error in install.packages("rPython") : unable to install packages ...

related: Is it possible to run a python script in R shiny

回答1:

In general, on shinyapps.io, python is installed, but that does not mean rPython works correctly, or that you will be able to execute your script (depending on what python packages you require).

While python itself may work we don't install scipy/numpy nor do we support installing custom python packages.