Skip to content

[BUG] Python virtual environment is not prioritized when specifying run_app(venv_path = ) #3

@anderstorstensson

Description

@anderstorstensson

Bug Description

ClassiPyR::run_app() is prioritizing the native Python installation over a specified virtual environment, even if the path is selected using the venv_path argument.

Steps to Reproduce

Install venv, e.g. using iRfcb::ifcb_py_install("path")
Specify ClassiPyR::run_app(venv_path = "path")

Expected Behavior

The venv_path environment should be used when specified in the run_app().

Actual Behavior

The native reticulate Python venv is selected and used, and may fail if scipy cannot be installed.

Environment

R Session Info:

> sessionInfo()
R version 4.5.2 (2025-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26200)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=Swedish_Sweden.utf8  LC_CTYPE=Swedish_Sweden.utf8    LC_MONETARY=Swedish_Sweden.utf8 LC_NUMERIC=C                    LC_TIME=Swedish_Sweden.utf8    

time zone: Europe/Stockholm
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ClassiPyR_0.0.0.9000

loaded via a namespace (and not attached):
 [1] tidyr_1.3.1        sass_0.4.10        generics_0.1.4     class_7.3-23       KernSmooth_2.23-26 stringi_1.8.7      lattice_0.22-7     hms_1.1.4          digest_0.6.38     
[10] magrittr_2.0.4     grid_4.5.2         timechange_0.3.0   RColorBrewer_1.1-3 iRfcb_0.7.0        fastmap_1.2.0      R.oo_1.27.1        jsonlite_2.0.0     Matrix_1.7-4      
[19] zip_2.3.3          R.utils_2.13.0     e1071_1.7-16       DBI_1.2.3          promises_1.3.3     worrms_0.4.3       purrr_1.2.0        scales_1.4.0       jquerylib_0.1.4   
[28] cli_3.6.4          shiny_1.11.1       rlang_1.1.6        units_1.0-0        R.methodsS3_1.8.2  R.matlab_3.7.0     cachem_1.1.0       tools_4.5.2        tzdb_0.5.0        
[37] dplyr_1.1.4        ggplot2_4.0.0      httpuv_1.6.16      DT_0.34.0          curl_7.0.0         reticulate_1.43.0  vctrs_0.6.5        R6_2.6.1           mime_0.13         
[46] png_0.1-8          proxy_0.4-27       classInt_0.4-11    lifecycle_1.0.4    lubridate_1.9.4    stringr_1.6.0      htmlwidgets_1.6.4  shinyjs_2.1.1      pkgconfig_2.0.3   
[55] pillar_1.11.1      bslib_0.9.0        later_1.4.4        gtable_0.3.6       glue_1.8.0         Rcpp_1.1.0         sf_1.0-21          tibble_3.3.0       tidyselect_1.2.1  
[64] rstudioapi_0.17.1  farver_2.1.2       xtable_1.8-4       htmltools_0.5.8.1  readr_2.1.5        compiler_4.5.2     S7_0.2.0    

Operating System: (e.g., Windows 11, macOS 14, Ubuntu 22.04)
Windows 11 and Ubuntu 24.04

Python Environment (only relevant for MAT file export):

  • Python available: Yes
  • scipy installed: Yes

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions