reddit / emacs

How do you activate virtual environments in Emacs

JCWalrus · 2022-12-16 01:58
Hey everyone! I posted yesterday about some difficulties I have had with virtual environments and Emacs, trying to finally set up Emacs as a Python IDE. I have elpy set up, and have managed to get that working. The only issue left is I have no idea how to wrap my head around pyvenv, which came included. Trying pyvenv-workon prompts me to set WORKON\_HOME, which I'm unsure about since I run Windows 10, and when I try to activate venvs I've already made and have stored on my computer it doesn't seem to work. Any advice on how I can use pyvenv effectively and program with Python well in Emacs, or any good documentation sources on what exactly is going on? I've tried reading the manuals, couldn't really make heads or tails of the virtual environments content.
dzecniv · 2022-12-16 10:42
I use what's here https://wikemacs.org/wiki/Python#Virtual_environments => https://github.com/porterjamesj/virtualenvwrapper.el which gives me M-x venv-workon, and I can autocomplete my existing venvs. I don't know if I have the latest and best tools for Python in Emacs, but this one works for me© (on Linux). (I still watch and edit this Wikemacs page too and I'll read others' edits with interest)
Extension_Try_6870 · 2022-12-16 18:36
I was using pyenv-mode but recently switched to envrc.el.