1

Does anyone know how to activate verbose logging with reticulate package in R? I am trying to load my Python package into R with the following code:

  version <- "3.7.9"
  reticulate::install_python(version = version)
  reticulate::virtualenv_create("newssentiment-environment", version = version, packages = "NewsSentiment")
  reticulate::use_virtualenv("newssentiment-environment")
  NewsSentiment_p <<- reticulate::import("NewsSentiment", delay_load = TRUE)
  tsc <<- NewsSentiment_p$TargetSentimentClassifier()

I have loaded the python environment into pycharm, and here the package installation has worked. Therefore, I am trying to see where the error in Rstudio lies. The installation of the package seems to work, I can see that all the package data is downloaded.

Running the code with debugg, shows the error message:

Error in py_module_import(module, convert = convert) : SystemExit: 1

I get the error message on my Windows computer, but the same code has worked on Ubuntu computers.

  • I am wondering the same thing. I am trying to run a Python script which has dependencies in an "operations" Python module. The script fails with the message: "Error in py_run_file_impl(file, local, convert) : ModuleNotFoundError: No module named 'operations'". This is fine while working locally, but the fact that it is not giving me the line number could make for a horrendous debugging situation later on. I also want more verbose logging! – David Sep 17 '22 at 03:04

0 Answers0