I'm trying to use
.dir-locals.el within porjects to specify the Python virtualenv that is activated on a per project basis using pyvenv. I've read the examples at Directory Variables - GNU Emacs Manual and have tried
((python-mode . ((pyvenv-workon "~/.virtualenvs/default") (subdirs . nil))))
With this I get the following error...
File local-variables error: (wrong-type-argument stringp (~/virtualenvs/default)
...and it does not activate this virtual environment, instead its activating
anaconda3 which is a nuisance because I thought I'd purged my system of Anaconda (in favour of using virtualenvwrapper).
I have the following in
~/.emacs.d/settings/python-settings.el (which is called from
;; elpy configuration (elpy-enable) (pyvenv-activate "~/.virtualenvs/dskit") ;; Set ipython as the default interpreter (setq elpy-rpc-python-command "python3") (setq python-shell-interpreter "ipython" python-shell-interpreter-args "-i --simple-prompt")
...and as I say I've purged my system of anaconda so I'm not sure how or why its being picked up as a virtual environment. Is there anyway to get debugging information out of Emacs pyvenv module when its loading to find out what its doing co I can work out whats going on?