I have tried to create a reprex Project (https://rstudio.cloud/spaces/54476/project/1055533) wherein I create a virtual environment for Python3 and then try to load a Python package chainladder installed within that environment.
This works satisfactorily on my desktop version of R/RStudio, but receives the following error message in RStudioCloud;-
> reticulate::repl_python()
Python 3.5.2 (/cloud/project/NSS/bin/python)
Reticulate 1.14.9001 REPL -- A Python interpreter in R.
>>> import chainladder as cl
SyntaxError: invalid syntax (core.py, line 178)
Here is the R script;-
install.packages("devtools")
devtools::install_github("rstudio/reticulate")
library(reticulate)
virtualenv_create("NSS", python = "/usr/bin/python3")
virtualenv_install('NSS', 'chainladder')
use_virtualenv('NSS', required = T)
py_discover_config()
Here is the Python script;-
import chainladder as cl
Other Python packages (e.g. pandas) do not have the same error message. Any suggestions, please?