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. Below is error. It's work in local computer. How do I solve it?
I use reticulate
package and setup virtual environment. This is in 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 .Rprofile:
Sys.setenv(RETICULATE_PYTHON = "~/.virtualenvs/python3.8env/bin/python")