-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python environment persistance across chunks #1440
Comments
This is a known issue and we will definitely improve it (hopefully by the end of this year). |
fwiw, imho, this would mean many using python could switch from juypter to knitr, starting with me. many thanks |
We have started working on it: rstudio/reticulate#107 |
Please test the dev version of reticulate. After knitr::knit_engines$set(python = reticulate::eng_python) Then later Python code chunks should be executed in the same Python session. |
this installed but did not persist the Python session across chunks in an Rmd file on Windows x64 {r} code chunk
{python} chunk
99 {python} chunk
|
I cannot reproduce your issue on macOS:
How exactly did you compile your Rmd document? |
my bad.
Q. is (2) a targeted feature, i.e. persisting across chunks in .Rmd when evaluated individually or previewed in RStudio? |
For now, we only support the |
Thank you! Another great job. Appreciate having it in knitr; have filed request for RStudio. |
I didn't contribute anything this time. @kevinushey was our hero 😁 |
Support for this feature in RStudio with R Markdown documents / R Notebooks is forthcoming, but we wanted to get this ready for users ASAP regardless! |
The python engine in the reticulate package has become the default in the current development version of knitr. I'd truly appreciate it if you can test it before I release a new version of knitr to CRAN. devtools::install_github("yihui/knitr") |
I know this has been marked closed, but I get a similar persistence issue when using child option in chunks. The child document.Rmd will knit by itself, but get object not defined errors when knitting the parent. Parent contains
The confusing part is that this does not seem to be consistently true. For example the specific error I get refers to a chunk which has a reference to an object defined 6 chunks earlier. But the previous 5 chunk also refer to the same object, but give no such issue. I have the dev version of knitr, rmarkdown and reticulate from github. Any ideas? Is this issue connected to the one closed here? Or is this a separate issue that should be opened? |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Here is the output of the minimal reproducible result: repr.pdf
The text was updated successfully, but these errors were encountered: