I'm trying to use reticulate in R to access Python's win32com (in order to read password-protected Excel documents), but am failing at the first hurdle. Although my code works fine in Python, when trying to use it in reticulate, the win32com module cannot be found.
As an example:
library(reticulate)
virtualenv_create("r-reticulate-test")
py_install(envname = "r-reticulate-test", packages = "pywin32")
win32 = import("win32com.client")
Results in:
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'win32com'