How can I specify rmarkdown to use python3 instead python 2?
问题 I am trying to run python as rmarkdwon code chunks. I was sucessfull but rmarkdown by default uses python2 and I want it to use python 3. I am running it on Ubuntu with python 2.7.6 installed and I installed anaconda with pytthon 3.5, which is the one I want rmarkdown use. Here is the code and output of the python chunk in rmarkdown ```{python} import sys print (sys.version) ``` and the output: 2.7.6 (default, Jun 22 2015, 17:58:13) Any ideas? 回答1: You can add engine.path = '/path/to/python3'