I have built R application with sourcing Python script. I use Python3.8 and setup virtual Python environment.
First, I understand that if use Python3.8, it isn't necessary to setup virtual environment. But my app can't deploy. Then I setup the virtual environment, it's still can't deploy. It's work in local computer. How do I solve it?
This is my R script:
reticulate::virtualenv_create(envname = "python3.8env")
reticulate::py_install(packages = c("pandas", "matplotlib", "openpyxl", "google.auth", "gspread", "virtualenv"), envname = "python3.8env")
reticulate::use_virtualenv("python3.8env", required = TRUE)
py_run_string("import virtualenv")
py_run_string("import pandas as pd")
py_run_file("teacherans6.py") #This is Python script
This is .Rprofile:
Sys.setenv(RETICULATE_PYTHON = "~/.virtualenvs/python3.8env/bin/python")
And this is error: