Activate a python environnement before launching script

Hello,

I'm making a Shiny App which is a graphical interface launching a python script with certain parameters chosen from the interface.
The problem is : this app is supposed to be spread so I wanted to use an environnement for my Python script to simplify the installation.
However I can't manage to activate the environnement.

I tried something like :
system(".venv\Scripts\activate.bat")
system(paste("python script.py", args))

But it seems the script doesn't use the environnement.

Thanks in advance!

PS : I'm on windows

using paste(".venv\Scripts\activate.bat && python script.py", args) works

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.