I am trying to knit a PDF file from R Studio but I need to use Python in the script. I also need to run a virtual environment with Python, which I have setup using Anaconda. I am directing to this virtual environment with:
pathToPython <- "path where python is installed"
Sys.setenv(RETICULATE_PYTHON = pathToPython)
And this works fine when I am not using a path that is from a virtual environment. However, as soon as I use a path for a virtual environment I get the following error, which I have been stuck on since a long time now:
I understand that the error is related to something with the path of the virtual environment, but I cannot pinpoint exactly to why this error shows up if this is exactly the path that is printed when doing something like "WHERE PYTHON" from the command line
Any help is appreciated