I have adapted how the python virtual environment is created and used, so that it can be used from both users' and developers perspective. I have made use of system.file() function to achieve that.
Based on the system.file() function behaviour when using devtools (see here), It might be sufficient to call the virtual environment that already exists in the inst/ folder.
Note, that I have relaxed the python version requirements from 3.9.7 to 3.9:latest, as I cannot check which version is being used beyond order of major patches (i.e. 3.9 in this case).
If you have already inst/pyvenv package - I would suggest to remove it as it might cause incompatibilities is you have a Python version installed that is higher than 3.9.7.
If you test whether the solution works - I would test it at least twice - once to see if it creates the virtual env, the second time to see if it uses the venv that is already created.
Hi @cforgaci and @Selkubi ,
I have adapted how the python virtual environment is created and used, so that it can be used from both users' and developers perspective. I have made use of
system.file()
function to achieve that.Based on the
system.file()
function behaviour when usingdevtools
(see here), It might be sufficient to call the virtual environment that already exists in theinst/
folder.Note, that I have relaxed the python version requirements from
3.9.7
to3.9:latest
, as I cannot check which version is being used beyond order of major patches (i.e.3.9
in this case).If you have already
inst/pyvenv
package - I would suggest to remove it as it might cause incompatibilities is you have a Python version installed that is higher than3.9.7
.If you test whether the solution works - I would test it at least twice - once to see if it creates the virtual env, the second time to see if it uses the venv that is already created.
Please let me know if you need more explanations.