R 网状:我如何 close/restart python 控制台

R reticulate: how can I close/restart the python console

source_python得到结果后,我可以关闭或重启python控制台吗?如果可以,怎么做?

假设我 closed/restarted python 控制台,我是否仍然能够在 R 中访问之前在 source_python 中创建的变量和函数?

不,我不认为这是可能的。您的问题已被讨论 here

引用 @jjallaire(开发者之一,RStudio 的首席执行官):"No, you can't safely unload and reload the connection to Python (too many unreversable side effects in the Python interpreter)"。

重新启动 python 连接需要重新启动 R。