Skip to content

Commit

Permalink
Fixes #125
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Sep 16, 2024
1 parent d92f8cc commit 21c9ca0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions R/python-install.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ install_environment <- function(
"PyArrow",
"grpcio",
"google-api-python-client",
"grpcio_status",
"rpy2"
"grpcio_status"
)

if (add_torch && install_ml) {
Expand Down
13 changes: 9 additions & 4 deletions R/sparklyr-spark-apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ spark_apply.tbl_pyspark <- function(
arrow_max_records_per_batch = NULL,
auto_deps = FALSE,
...) {
py_check_installed(
libraries = "rpy2",
msg = "Requires an additional Python library"
)
rpy2_installed()
cli_div(theme = cli_colors())
if (!is.null(packages)) {
cli_abort("`packages` is not yet supported for this backend")
Expand Down Expand Up @@ -209,3 +206,11 @@ sa_function_to_string <- function(
}
ret
}

rpy2_installed <- function(envname = NULL) {
py_check_installed(
envname = envname,
libraries = "rpy2",
msg = "Required 'rpy2' Python library is missing"
)
}

0 comments on commit 21c9ca0

Please sign in to comment.