SyntaxError: invalid syntax (core.py, line 178) when trying to import chainladder package
See original GitHub issueI have created a reprex Project (https://rstudio.cloud/spaces/54476/project/1055533) in RStudioCloud with a virtual environment for Python3. When I try to load the chainladder package previously installed within that environment, it 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)
Here is the Python script;-
import chainladder as cl
This works satisfactorily on my desktop version of R/RStudio. Any suggestions, please?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SyntaxError: invalid syntax (core.py, line 178) when trying to ...
SyntaxError : invalid syntax (core.py, line 178) when trying to import chainladder package ... I have tried to create a reprex Project (https:// ......
Read more >How can I fix SyntaxError: invalid syntax/ import * from modbus?
In verion 1 of main.py you would see Imported module my_imports in the output but your code would fail when you try to...
Read more >Development Tutorial — Reserving in Python
The chain ladder method is based on the strong assumptions of independence across origin periods and across valuation periods. Mack developed tests to...
Read more >"pip install" causes SyntaxError: invalid syntax [Solved]
If you get a SyntaxError: invalid syntax when trying to install a module using ... the specific package, you can import it and...
Read more >Read the Docs Documentation
Read the Docs will try to build the documentation of your project right after you ... Install our python package before building the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No worries, I do claim python 3.5 compatibility so I should keep the tutorials that way too.
Thanks very much again @jbogaardt