GNU bug report logs -
#31410
25.3; Python.el: Support for Python virtual environment (venv)
Previous Next
Full log
Message #8 received at 31410 <at> debbugs.gnu.org (full text, mbox):
> When reading Python.el source code, I see it's support Python virtual
> environment by setting the variable 'python-shell-vertualenv-root'
> It would be more discoverable if we have an interactive function to do
> that. Somthing like 'python-virtualenv' or similar. The must would be to
> have a key binding for it and eplained it in mode help.
This is just an opinion, but I think the virtualenv support in the
Python shell is a misguided feature. The problem is that it merely sets
up the shell to run in a given virtualenv; it has no influence on other
external tools such as language servers or, say, ‘M-x compile RET pytest
RET’.
Instead, it would be better to embrace the idea of setting the
‘process-environment’ and ‘exec-path’ variables buffer-locally. There
are some rough edges to be polished, cf [1]. But at least there are
packages, such as envrc, direnv and buffer-env (on MELPA) to help
managing env vars in Emacs.
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46345
This bug report was last modified 3 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.