使用 Reticulate Thows 错误 py_version 创建虚拟环境

问题描述

在 Shinyapps.io 中部署 Shiny 时尝试创建虚拟环境 我正在使用此示例并尝试使其适应我的:https://github.com/ranikay/shiny-reticulate-app 我一开始就收到错误。 Python 新手......无法自己弄清楚我错过了什么。

如果我在 Shinyapps.io 中部署它,它虽然可以正常工作。 .

当我这样做时:

library(shiny)
library(dplyr)

  python_path = Sys.getenv('PYTHON_PATH')

  reticulate::virtualenv_create(envname = '.test_env',python = python_path)

我收到此错误

Error in if (py_version >= "3.6") modules <- c("venv",modules) : 
argument is of length zero
In addition: Warning message:
In system2(python,args,stdout = TRUE,stderr = FALSE) :
running command '"python3" -E -c "import platform; print(platform.python_version())"' had status 9009

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)