Get emacs to automatically active a virtualenv for a directory & below

create a .dir-locals.el file:

((nil . ((pyvenv-workon . "rsync"))))

ensure that env var WORKON_HOME is set, either in shell or earlier in emacs config as below:

(setenv "WORKON_HOME" "~/.venvs")

Leave a Reply

Your email address will not be published. Required fields are marked *