I have virtual environment set on my system (actually virtualenvwrapper). I would like to direct org babel to use a specific environment in a single code block or on the whole buffer. How can I do it?
I believe I found the solution.
- Install virtualenvwrapper
Run the setup:
(require 'virtualenvwrapper) (venv-initialize-interactive-shells) ;; if you want interactive shell support (venv-initialize-eshell) ;; if you want eshell support (setq venv-location "/path/to/your/virtualenvs/")
workonthe desired virtual environment. Then you can run code block and use the desired interpreter.