首页 > 解决方案 > 在 R 中看不到带有网状结构的 Python 函数文档

问题描述

我在 RStudio (1.4) 上遇到了一个问题,我在帮助面板中看不到 Python 文档。我正在使用reticulatev. 1.20,我的 Python 解释器工作正常。但是,如果我使用 F1 键盘快捷键或运行,例如,?np.random.rand我会收到以下错误:

>>> ?np.random.rand
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function
Error in html$page(pydoc$describe(resolved), html$document(resolved, name)) : 
  attempt to apply non-function

帮助面板显示:/python/np.random.rand.html not found

没有在其他地方看到这个问题。

标签: pythonrdocumentationreticulate

解决方案


这似乎在开发版本中已修复,reticulate可以按如下方式安装:

devtools::install_github("rstudio/reticulate")


推荐阅读