Skip to main content
6 events
when toggle format what by license comment
Mar 31, 2021 at 15:15 comment added kotchwane I use (setq org-babel-python-command "py -3.9") to use Python 3.9, taking advantage of the pylauncher. Each time I need Python 3.7, I just change 3.9 to 3.7 in the command.
Apr 24, 2019 at 9:27 comment added Lalylulelo It may be safer and more flexible to add this in a file variable. You may end up using python3 while wanting/thinking/needing python2. Using M-x add-file-local-variable, then selecting org-babel-python-command and setting it to "python3" (notice the quotes), it changes the variable only for the current file. You need to revert the buffer. You may also need to validate this local change of variable. You can check the python version by importing the sys module and printing the version print(sys.version).
Jul 24, 2018 at 19:09 comment added Frank M This solution also works if the line is added to .emacs.el or .emacs.d/init.el
May 4, 2018 at 19:24 vote accept Cy Bu
May 26, 2017 at 9:43 comment added Basil What do you mean by "here" vs "in the ob-python.el file directly"?
Oct 27, 2016 at 20:22 history answered Cy Bu CC BY-SA 3.0