SyntaxError: invalid syntax (, line 178) when trying to import chainladder package

I have tried to create a reprex Project ( 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 (, line 178)

Here is the R script;-

virtualenv_create("NSS", python = "/usr/bin/python3")
virtualenv_install('NSS', 'chainladder')
use_virtualenv('NSS', required = T)

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?

The issue is resolved. There was a compatibility issue between the xlcompose package and Python 3.5, which has now been fixed.

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