[R] reticulate via callr

Benjamin Tyner btyner @end|ng |rom gm@||@com
Thu Apr 10 02:59:48 CEST 2025


Greetings,

I would like to programmatically interact with multiple versions of a 
given Python module via the reticulate package, without having to 
restart the R process over and over. (My understanding is reticulate 
does not provide such a capability by itself, as once reticulate binds 
to a Python instance, the connection persists for the duration of the R 
session.) However, it occurs to me that it might be possible to use 
callr to run a wrapper effectively creating a fresh instance of Python 
with each invocation. Before getting too far into the weeds there, I'm 
curious if there is anyone on the list who has already tried such an 
approach, and if so, was it successful, or were there obstacles/pitfalls 
to be aware of? I'm not asking for sample code, just curious to hear 
informed opinions on whether this is a fool's errand.

Regards,

Ben



More information about the R-help mailing list