I am trying to publish a Shiny application that uses a module that I wrote. This Python module uses selenium
, pandas
, urllib3
, time
, and re
. First, I tried to create a virtualenv and publish the virtualenv along with the app. I kept getting a ModuleNotFoundError
for selenium (selenium is the first library I import). Then after some reading I figured out that I need to create a virtual environment within shinyapps. So, my code at the beginning of my app now looks like this:
library(shiny)
library(tidyverse)
library(DescTools)
library(lubridate)
library(googlesheets4)
# Import python module scrapeinsolvencyinsider.py
reticulate::virtualenv_create(envname="statcanEnv", python="python3", version=3.8)
reticulate::virtualenv_install("statcanEnv", packages=c("pandas", "selenium", "urllib3"))
reticulate::use_virtualenv("statcanEnv", required=TRUE)
sii <- reticulate::import("scrapeinsolvencyinsider")
Again I get the ModuleNotFoundError
:
My question is, how can I deploy a Shiny app that uses Python modules?
Also, I will need a way of also installing ChromeDriver on shinyapps.io as well.